Malvina
Malvina

Reputation: 3

Editing the style of xctk:DoubleUpDown Control

I like to change the Corner Radius of the xctk:DoubleUpDown Control to 2. The following code does not work. Without the Control Template Part no error is shown, but with the "Setter Property Template part" the error "73 Undefined CLR-namespace´ URI to a namespace ´Xceed.Wpf.Toolkit.Themes that could not be found." is displayed.

Fontfamily, Fontsize, BorderThickness, Foreground are working.

Thank you for any help.

<xCtrl:ToolPanel 
         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
         xmlns:xCtrl="clr-namespace:XRayOfficeCore.GUI.Wpf;assembly=XRayOfficeCore"
         xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit" x:Class="EmitterGUI.StandardGUIPanel"
        xmlns:theme="clr-namespace:Xceed.Wpf.Toolkit.Themes;assembly=Xceed.Wpf.Toolkit"    
         mc:Ignorable="d" Width="564" Height="362">

    <xCtrl:ToolPanel.Resources>

   <Style TargetType="xctk:DoubleUpDown">
                <Setter Property="BorderBrush" Value="#FFC7CACC"/>
        <Setter Property="FontFamily" Value="Frutiger LT Com 45 Light"/>
        <Setter Property="FontSize" Value="13"/>
        <Setter Property="BorderThickness" Value="1" />
        <Setter Property="Background" Value="#FFFFFFFF"/>
        <Setter Property="Foreground" Value="#FF000000" />
        <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type xctk:DoubleUpDown}">
            <Border BorderThickness="1" CornerRadius="2">
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 </xCtrl:ToolPanel.Resources>
<Grid> 
(...)
</Grid>
</xCtrl:ToolPanel>

Upvotes: 0

Views: 1257

Answers (1)

Eli Dagan
Eli Dagan

Reputation: 848

xctk:DoubleUpDown inherite from UpDownBase (not directly) and it exppected that the following pars will be in the control template

See base class TemplatePart attributes:

 [TemplatePart(Name = "PART_Spinner", Type = typeof (Spinner))]
 [TemplatePart(Name = "PART_TextBox", Type = typeof (TextBox))]
 public abstract class UpDownBase<T> : InputBase, IValidateInput

Upvotes: 0

Related Questions