Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all 4964 articles
Browse latest View live

New Post: filter the datagrid

$
0
0
Hi,

Yes the DataGrid uses data virtualization. If the source you are using is a DataGridVirtualizingCollectionView, data virtualization will be enabled. But if your source is a List or an ObservableCollection, the data virtualization won't be enabled since all the data is the source of the dataGrid.

The DataGrid included in the toolkit doesn't support filtering. It is a downgraded version of the Xceed WPF DataGrid. This Xceed WPF DataGrid supports filtering and many others features like :
-Master/detail
-Filter row
-Insertion row
-Auto-filter popup
-Card view
-3D view
-Stat rows and summary rows
-Print/preview
-Exporting (such as export to Excel)
-Column chooser
-Column splitter (this can still be performed programmatically)
-Persist user settings
-Merged column headers
-Themes
-Design-Time support

http://xceed.com/Grid_WPF_Features.html.

Commented Unassigned: AvalonDock Now Loses Alt Key Adornments [20882]

$
0
0
I've been using AvalonDock (2.0) for some time now, being key for managing documents in an IDE. In the last several months, I've noticed that Alt key adornments are no longer showing up for controls within AvalonDock, though the Alt key commands are executing as expected. See the image below where the Alt key adornments are showing up in the menu, but not for the buttons inside AvalonDock:

![Image](http://i.stack.imgur.com/KnomF.png)

What is particularly interesting about this issue, that it appears to be triggered by an environmental setting or condition.

As demonstrated in this [video](http://www.youtube.com/watch?v=D-S_PGJoTkc) (at 2:07), the alt key adornments are working for a control within AvalonDock. But, if I now use the very same executable I used in that video, the alt key adornments do not work.

I also built a very simple test application which loads a couple of documents of type Item, where Item is a simple class with a Name property:

```
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:avalonDock="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockLayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockControls="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock"
Title="MainWindow" Height="500" Width="500">
<Window.Resources>
<ResourceDictionary>
<DataTemplate DataType="{x:Type local:Item}">
<StackPanel Orientation="Vertical">
<Label Content="Item:" />
<TextBox Text="{Binding Name}"/>
<Button Content="_ClickMe" />
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<avalonDock:DockingManager Grid.Row="0" DocumentsSource="{Binding}">
<avalonDockLayout:LayoutRoot>
<avalonDockLayout:LayoutPanel Orientation="Horizontal">
<avalonDockLayout:LayoutDocumentPane/>
</avalonDockLayout:LayoutPanel>
</avalonDockLayout:LayoutRoot>
</avalonDock:DockingManager>
<Button Grid.Row="1" Content="_Test" />
</Grid>
</Window>
```

Even with this simple application, the Alt key adornments show up for the Test button outside of AvalonDock, but not for the ClickMe buttons for the controls within AvalonDock. I've also done this with the sample application here, so this seems for sure to be a bug.

Any ideas on how to correct or workaround this issue?
Comments: ** Comment from web user: oatkins **

We have the same issue. It happens when you're using data binding and item templates (LayoutItemTemplate) with AvalonDock. The problem goes away if you un-dock the pane whose access key adornments do not otherwise show up.

I believe that this is a problem with the consistency of the WPF logical tree. Internally, WPF uses an inherited attached property to turn on the keyboard shortcut cues. When the logical tree is broken, changes to this attached property don't propagate through to the AvalonDock panes, so the cues don't show up.

Commented Unassigned: AvalonDock Now Loses Alt Key Adornments [20882]

$
0
0
I've been using AvalonDock (2.0) for some time now, being key for managing documents in an IDE. In the last several months, I've noticed that Alt key adornments are no longer showing up for controls within AvalonDock, though the Alt key commands are executing as expected. See the image below where the Alt key adornments are showing up in the menu, but not for the buttons inside AvalonDock:

![Image](http://i.stack.imgur.com/KnomF.png)

What is particularly interesting about this issue, that it appears to be triggered by an environmental setting or condition.

As demonstrated in this [video](http://www.youtube.com/watch?v=D-S_PGJoTkc) (at 2:07), the alt key adornments are working for a control within AvalonDock. But, if I now use the very same executable I used in that video, the alt key adornments do not work.

I also built a very simple test application which loads a couple of documents of type Item, where Item is a simple class with a Name property:

```
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:avalonDock="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockLayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockControls="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock"
Title="MainWindow" Height="500" Width="500">
<Window.Resources>
<ResourceDictionary>
<DataTemplate DataType="{x:Type local:Item}">
<StackPanel Orientation="Vertical">
<Label Content="Item:" />
<TextBox Text="{Binding Name}"/>
<Button Content="_ClickMe" />
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<avalonDock:DockingManager Grid.Row="0" DocumentsSource="{Binding}">
<avalonDockLayout:LayoutRoot>
<avalonDockLayout:LayoutPanel Orientation="Horizontal">
<avalonDockLayout:LayoutDocumentPane/>
</avalonDockLayout:LayoutPanel>
</avalonDockLayout:LayoutRoot>
</avalonDock:DockingManager>
<Button Grid.Row="1" Content="_Test" />
</Grid>
</Window>
```

Even with this simple application, the Alt key adornments show up for the Test button outside of AvalonDock, but not for the ClickMe buttons for the controls within AvalonDock. I've also done this with the sample application here, so this seems for sure to be a bug.

Any ideas on how to correct or workaround this issue?
Comments: ** Comment from web user: BoucherS **

Hi,

This bug will be fixed in v2.3.

Edited Issue: AvalonDock Now Loses Alt Key Adornments [20882]

$
0
0
I've been using AvalonDock (2.0) for some time now, being key for managing documents in an IDE. In the last several months, I've noticed that Alt key adornments are no longer showing up for controls within AvalonDock, though the Alt key commands are executing as expected. See the image below where the Alt key adornments are showing up in the menu, but not for the buttons inside AvalonDock:

![Image](http://i.stack.imgur.com/KnomF.png)

What is particularly interesting about this issue, that it appears to be triggered by an environmental setting or condition.

As demonstrated in this [video](http://www.youtube.com/watch?v=D-S_PGJoTkc) (at 2:07), the alt key adornments are working for a control within AvalonDock. But, if I now use the very same executable I used in that video, the alt key adornments do not work.

I also built a very simple test application which loads a couple of documents of type Item, where Item is a simple class with a Name property:

```
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:avalonDock="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockLayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockControls="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock"
Title="MainWindow" Height="500" Width="500">
<Window.Resources>
<ResourceDictionary>
<DataTemplate DataType="{x:Type local:Item}">
<StackPanel Orientation="Vertical">
<Label Content="Item:" />
<TextBox Text="{Binding Name}"/>
<Button Content="_ClickMe" />
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<avalonDock:DockingManager Grid.Row="0" DocumentsSource="{Binding}">
<avalonDockLayout:LayoutRoot>
<avalonDockLayout:LayoutPanel Orientation="Horizontal">
<avalonDockLayout:LayoutDocumentPane/>
</avalonDockLayout:LayoutPanel>
</avalonDockLayout:LayoutRoot>
</avalonDock:DockingManager>
<Button Grid.Row="1" Content="_Test" />
</Grid>
</Window>
```

Even with this simple application, the Alt key adornments show up for the Test button outside of AvalonDock, but not for the ClickMe buttons for the controls within AvalonDock. I've also done this with the sample application here, so this seems for sure to be a bug.

Any ideas on how to correct or workaround this issue?

Commented Issue: AvalonDock Now Loses Alt Key Adornments [20882]

$
0
0
I've been using AvalonDock (2.0) for some time now, being key for managing documents in an IDE. In the last several months, I've noticed that Alt key adornments are no longer showing up for controls within AvalonDock, though the Alt key commands are executing as expected. See the image below where the Alt key adornments are showing up in the menu, but not for the buttons inside AvalonDock:

![Image](http://i.stack.imgur.com/KnomF.png)

What is particularly interesting about this issue, that it appears to be triggered by an environmental setting or condition.

As demonstrated in this [video](http://www.youtube.com/watch?v=D-S_PGJoTkc) (at 2:07), the alt key adornments are working for a control within AvalonDock. But, if I now use the very same executable I used in that video, the alt key adornments do not work.

I also built a very simple test application which loads a couple of documents of type Item, where Item is a simple class with a Name property:

```
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:avalonDock="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockLayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockControls="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock"
Title="MainWindow" Height="500" Width="500">
<Window.Resources>
<ResourceDictionary>
<DataTemplate DataType="{x:Type local:Item}">
<StackPanel Orientation="Vertical">
<Label Content="Item:" />
<TextBox Text="{Binding Name}"/>
<Button Content="_ClickMe" />
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<avalonDock:DockingManager Grid.Row="0" DocumentsSource="{Binding}">
<avalonDockLayout:LayoutRoot>
<avalonDockLayout:LayoutPanel Orientation="Horizontal">
<avalonDockLayout:LayoutDocumentPane/>
</avalonDockLayout:LayoutPanel>
</avalonDockLayout:LayoutRoot>
</avalonDock:DockingManager>
<Button Grid.Row="1" Content="_Test" />
</Grid>
</Window>
```

Even with this simple application, the Alt key adornments show up for the Test button outside of AvalonDock, but not for the ClickMe buttons for the controls within AvalonDock. I've also done this with the sample application here, so this seems for sure to be a bug.

Any ideas on how to correct or workaround this issue?
Comments: ** Comment from web user: moplus **

Great, thanks for the update!

Commented Issue: AvalonDock Now Loses Alt Key Adornments [20882]

$
0
0
I've been using AvalonDock (2.0) for some time now, being key for managing documents in an IDE. In the last several months, I've noticed that Alt key adornments are no longer showing up for controls within AvalonDock, though the Alt key commands are executing as expected. See the image below where the Alt key adornments are showing up in the menu, but not for the buttons inside AvalonDock:

![Image](http://i.stack.imgur.com/KnomF.png)

What is particularly interesting about this issue, that it appears to be triggered by an environmental setting or condition.

As demonstrated in this [video](http://www.youtube.com/watch?v=D-S_PGJoTkc) (at 2:07), the alt key adornments are working for a control within AvalonDock. But, if I now use the very same executable I used in that video, the alt key adornments do not work.

I also built a very simple test application which loads a couple of documents of type Item, where Item is a simple class with a Name property:

```
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:avalonDock="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockLayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockControls="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock"
Title="MainWindow" Height="500" Width="500">
<Window.Resources>
<ResourceDictionary>
<DataTemplate DataType="{x:Type local:Item}">
<StackPanel Orientation="Vertical">
<Label Content="Item:" />
<TextBox Text="{Binding Name}"/>
<Button Content="_ClickMe" />
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<avalonDock:DockingManager Grid.Row="0" DocumentsSource="{Binding}">
<avalonDockLayout:LayoutRoot>
<avalonDockLayout:LayoutPanel Orientation="Horizontal">
<avalonDockLayout:LayoutDocumentPane/>
</avalonDockLayout:LayoutPanel>
</avalonDockLayout:LayoutRoot>
</avalonDock:DockingManager>
<Button Grid.Row="1" Content="_Test" />
</Grid>
</Window>
```

Even with this simple application, the Alt key adornments show up for the Test button outside of AvalonDock, but not for the ClickMe buttons for the controls within AvalonDock. I've also done this with the sample application here, so this seems for sure to be a bug.

Any ideas on how to correct or workaround this issue?
Comments: ** Comment from web user: oatkins **

Great!

For the time being, I've come up with a workaround: a System.Windows.Interactivity behavior that can be attached to the contents of the DataTemplate to restore keyboard cues. Beware: it relies on reflection to access WPF internals, so I'll be glad to be able to get rid of it in the future!


public class FixKeyboardCuesBehavior : Behavior<UIElement>
{
private static readonly DependencyProperty ShowKeyboardCuesProperty;

static FixKeyboardCuesBehavior()
{
Type keyboardNavigation = typeof(KeyboardNavigation);
var field = keyboardNavigation.GetField("ShowKeyboardCuesProperty", BindingFlags.NonPublic | BindingFlags.Static);

Debug.Assert(field != null, "field != null");

ShowKeyboardCuesProperty = (DependencyProperty)field.GetValue(null);
}

protected override void OnAttached()
{
base.OnAttached();

Window rootWindow = Window.GetWindow(this.AssociatedObject);
if (rootWindow == null)
{
return;
}

BindingOperations.SetBinding(
this.AssociatedObject,
ShowKeyboardCuesProperty,
new Binding("(KeyboardNavigation.ShowKeyboardCues)") { Source = rootWindow });
}
}

Commented Issue: AvalonDock Now Loses Alt Key Adornments [20882]

$
0
0
I've been using AvalonDock (2.0) for some time now, being key for managing documents in an IDE. In the last several months, I've noticed that Alt key adornments are no longer showing up for controls within AvalonDock, though the Alt key commands are executing as expected. See the image below where the Alt key adornments are showing up in the menu, but not for the buttons inside AvalonDock:

![Image](http://i.stack.imgur.com/KnomF.png)

What is particularly interesting about this issue, that it appears to be triggered by an environmental setting or condition.

As demonstrated in this [video](http://www.youtube.com/watch?v=D-S_PGJoTkc) (at 2:07), the alt key adornments are working for a control within AvalonDock. But, if I now use the very same executable I used in that video, the alt key adornments do not work.

I also built a very simple test application which loads a couple of documents of type Item, where Item is a simple class with a Name property:

```
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:avalonDock="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockLayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockControls="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock"
Title="MainWindow" Height="500" Width="500">
<Window.Resources>
<ResourceDictionary>
<DataTemplate DataType="{x:Type local:Item}">
<StackPanel Orientation="Vertical">
<Label Content="Item:" />
<TextBox Text="{Binding Name}"/>
<Button Content="_ClickMe" />
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<avalonDock:DockingManager Grid.Row="0" DocumentsSource="{Binding}">
<avalonDockLayout:LayoutRoot>
<avalonDockLayout:LayoutPanel Orientation="Horizontal">
<avalonDockLayout:LayoutDocumentPane/>
</avalonDockLayout:LayoutPanel>
</avalonDockLayout:LayoutRoot>
</avalonDock:DockingManager>
<Button Grid.Row="1" Content="_Test" />
</Grid>
</Window>
```

Even with this simple application, the Alt key adornments show up for the Test button outside of AvalonDock, but not for the ClickMe buttons for the controls within AvalonDock. I've also done this with the sample application here, so this seems for sure to be a bug.

Any ideas on how to correct or workaround this issue?
Comments: ** Comment from web user: moplus **

Thanks oatkins, I'll try your workaround in the meantime.

New Post: Custom PropertyDescriptor not getting updated in Property Grid and nullables don't all show up?

$
0
0
Hey,

So we setup a custom PropertyDescriptor to work with the PropGrid and things display correctly besides Nullable Types (bools do show up but that's it) but any values that are changed do not get passed to the actual class (GetValue and SetValue are NEVER called from the PropertyDescriptor class)

    /// <summary>
    ///  This is a dummy class that acts as a surrogate.
    /// We have to add the activated objects to this so they can be edited, and then push the values back.
    /// </summary>
    [TypeConverter(typeof(CustomObjectConverter))]
    public class SurrogateAction : Item
    {
        private readonly List<ProxyMember> _props = new List<ProxyMember>();
        private readonly Dictionary<string, object> _values = new Dictionary<string, object>();

        [OrderedCategory("Action Properties", 10)]
        [ReadOnly(true)]
        public string Name { get; set; }
        
        [Browsable(false)]
        public List<ProxyMember> Members { get { return _props; } }

        public object this[string name]
        {
            get { object val; _values.TryGetValue(name, out val); return val; }
            set { _values.Remove(name); }
        }

        private class CustomObjectConverter : ExpandableObjectConverter
        {
            public override PropertyDescriptorCollection GetProperties(ITypeDescriptorContext context, object value, Attribute[] attributes)
            {
                var stdProps = base.GetProperties(context, value, attributes);
                var obj = value as SurrogateAction;
                var customProps = obj == null ? null : obj.Members;
                var props = new PropertyDescriptor[stdProps.Count + (customProps == null ? 0 : customProps.Count)];
                stdProps.CopyTo(props, 0);
                if (customProps == null) return new PropertyDescriptorCollection(props);

                var index = stdProps.Count;
                foreach (var prop in customProps)
                {
                    props[index++] = new CustomPropertyDescriptor(prop);
                }
                return new PropertyDescriptorCollection(props);
            }
        }
        private class CustomPropertyDescriptor : PropertyDescriptor
        {
            private readonly ProxyMember _prop;
            public CustomPropertyDescriptor(ProxyMember prop)
                : base(prop.Name, null)
            {
                this._prop = prop;
            }
            public override string Category { get { return "Action Properties"; } }
            public override string Description { get { return _prop.Description; } }
            public override string Name { get { return _prop.Name; } }
            public override bool ShouldSerializeValue(object component) { return ((SurrogateAction)component)[_prop.Name] != null; }
            public override void ResetValue(object component) { ((SurrogateAction)component)[_prop.Name] = null; }
            public override bool IsReadOnly { get { return false; } }
            public override Type PropertyType { get { return _prop.Type; } }
            public override bool CanResetValue(object component) { return true; }
            public override Type ComponentType { get { return typeof(SurrogateAction); } }
            public override void SetValue(object component, object value) { ((SurrogateAction)component)[_prop.Name] = value; }
            public override object GetValue(object component) { return ((SurrogateAction)component)[_prop.Name] ?? _prop.DefaultValue; }
        }
    }
and the Proxy is just
public class ProxyMember
    {
        public string Name { get; set; }
        public string Description { get; set; }
        public object DefaultValue { get; set; }
        public Type Type { get; set; }
    }
IF I change a value in the grid and then check the value in the code, like I said, the object itself doesn't get the update and only the control (textbox, checkbox etc.) gets it for some reason. Is there something that we can do to finish this hook up or is this one of those "only possible in the paid" things? I've thought about just having to pull the value back out of the grid which seems like a bigger hassle than if I just missed something makes it not hook up correctly to make
public override void SetValue(object component, object value) { ((SurrogateAction)component)[_prop.Name] = value; }
Thanks,

Travis

New Post: change DateTimeUpDown background OnMouseOver and IsPressed

$
0
0
Hi,

Here's a solution on how to modify the RepeatButtons background when they are mousedOver or pressed :
<Window x:Class="WpfApplication34.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
        xmlns:themes="clr-namespace:Xceed.Wpf.Toolkit.Themes;assembly=Xceed.Wpf.Toolkit"
        Title="MainWindow" Height="350" Width="525">
   <Window.Resources>
      <Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type themes:ResourceKeys}, ResourceId=SpinnerButtonStyleKey}"
             TargetType="RepeatButton">
         <Setter Property="Background"
                 Value="Red" />
         <Setter Property="BorderBrush"
                 Value="Black" />
         <Setter Property="BorderThickness"
                 Value="1" />
         <Setter Property="Padding"
                 Value="2,2" />
         <Setter Property="Template">
            <Setter.Value>
               <ControlTemplate TargetType="RepeatButton">
                  <Grid>
                     <xctk:ButtonChrome x:Name="Chrome"
                                          BorderBrush="{TemplateBinding BorderBrush}"
                                          Background="{TemplateBinding Background}"
                                          CornerRadius="{DynamicResource {x:Static themes:ResourceKeys.SpinButtonCornerRadiusKey}}"
                                          SnapsToDevicePixels="true" />

                     <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                       VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                       Margin="{TemplateBinding Padding}" />
                  </Grid>
                  <ControlTemplate.Triggers>
                     <Trigger Property="IsMouseOver"
                              Value="True">
                        <Setter Property="Background"
                                Value="Green" />
                     </Trigger>
                     <Trigger Property="IsPressed"
                              Value="True">
                        <Setter Property="Background"
                                Value="Blue" />
                     </Trigger>
                  </ControlTemplate.Triggers>
               </ControlTemplate>
            </Setter.Value>
         </Setter>
      </Style>

   </Window.Resources>
    <Grid>
      <xctk:TimePicker Width="150"
                                  Height="22" />
   </Grid>
</Window>
For the 2nd problem (Mouse click on control behind the TimePicker), I can't reproduce. Can you show a sample of how to reproduce ? I use a TimePicker with a Big Button behind and the Button never calls it's click callback when selecting a time from the TimePicker's listBox.

Commented Unassigned: In color picker, when selected, Chocolate displays "Ccolate" [20881]

$
0
0
![Image](http://i.imgur.com/dnWIwWM.png)

Update: I've noticed a number of these abbreviations. Is there a reason for all of the abbreviated names?
Comments: ** Comment from web user: BoucherS **

Hi,

I can not reproduce this bug in version 2.0 and over. Could it be something with the configuration of your System or Windows ?

New Post: How to disable auto-validation in DateTimePicker.

$
0
0
Hi,
In v2.3, the last valid date will be set back when something invalid is set.

In the meantime, to have this behavior, you can go in file Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs, in method "TryParseDateTime", add the following lines before the return :
if( !isValid )
        result = current;

New Post: Dynamically Hide/Show Property in the property grid

New Post: How to disable auto-validation in DateTimePicker.

$
0
0
Awesome! That gives me a few solutions.

Thanks a lot. I appreciate your time....

New Post: How to disable auto-validation in DateTimePicker.

$
0
0
BoucherS wrote:
In the meantime, to have this behavior, you can go in file Xceed.Wpf.Toolkit/DateTimeUpDown/Implementation/DateTimeUpDown.cs, in method "TryParseDateTime", add the following lines before the return :
if( !isValid )
        result = current;
I've tried to track down the method you're referring to, but I can't seem to find it. I'm using version 1.9.0.0.

New Post: How to disable auto-validation in DateTimePicker.

$
0
0
I did find where you're talking about; however, that solution does not give me what I need. It still resets it to the last digit of the invalid value.

Commented Unassigned: In color picker, when selected, Chocolate displays "Ccolate" [20881]

$
0
0
![Image](http://i.imgur.com/dnWIwWM.png)

Update: I've noticed a number of these abbreviations. Is there a reason for all of the abbreviated names?
Comments: ** Comment from web user: benjin **

What type of configuration issues might I look into?

I'm running v2.1.0.0 on 64-bit Windows 8.1 Pro + Update 1. Language is en-us.

Created Unassigned: CheckComboBox DisplayMemebrPath problem [20919]

$
0
0
When selecting an item, the combobox shows exactly the right string. But while the droppbox is open, the named displayed in the droppbox are all set to the name of the entity in ItemSource

Commented Issue: AvalonDock Now Loses Alt Key Adornments [20882]

$
0
0
I've been using AvalonDock (2.0) for some time now, being key for managing documents in an IDE. In the last several months, I've noticed that Alt key adornments are no longer showing up for controls within AvalonDock, though the Alt key commands are executing as expected. See the image below where the Alt key adornments are showing up in the menu, but not for the buttons inside AvalonDock:

![Image](http://i.stack.imgur.com/KnomF.png)

What is particularly interesting about this issue, that it appears to be triggered by an environmental setting or condition.

As demonstrated in this [video](http://www.youtube.com/watch?v=D-S_PGJoTkc) (at 2:07), the alt key adornments are working for a control within AvalonDock. But, if I now use the very same executable I used in that video, the alt key adornments do not work.

I also built a very simple test application which loads a couple of documents of type Item, where Item is a simple class with a Name property:

```
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:avalonDock="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockLayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockControls="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock"
Title="MainWindow" Height="500" Width="500">
<Window.Resources>
<ResourceDictionary>
<DataTemplate DataType="{x:Type local:Item}">
<StackPanel Orientation="Vertical">
<Label Content="Item:" />
<TextBox Text="{Binding Name}"/>
<Button Content="_ClickMe" />
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<avalonDock:DockingManager Grid.Row="0" DocumentsSource="{Binding}">
<avalonDockLayout:LayoutRoot>
<avalonDockLayout:LayoutPanel Orientation="Horizontal">
<avalonDockLayout:LayoutDocumentPane/>
</avalonDockLayout:LayoutPanel>
</avalonDockLayout:LayoutRoot>
</avalonDock:DockingManager>
<Button Grid.Row="1" Content="_Test" />
</Grid>
</Window>
```

Even with this simple application, the Alt key adornments show up for the Test button outside of AvalonDock, but not for the ClickMe buttons for the controls within AvalonDock. I've also done this with the sample application here, so this seems for sure to be a bug.

Any ideas on how to correct or workaround this issue?
Comments: ** Comment from web user: moplus **

Hi oatkins,

I'm a little stumped on applying your attached behavior, especially since there is no associated public DependencyProperty. Could you provide an example? I was trying to do something like:

```
<avalonDock:DockingManager.DocumentPaneControlStyle>
<Style TargetType="{x:Type avalonDockControls:LayoutDocumentPaneControl}" BasedOn="{StaticResource DocumentPane}">
<Setter Property="Library:FixKeyboardCuesBehavior.ShowKeyboardCues" Value="null" />
</Style>
</avalonDock:DockingManager.DocumentPaneControlStyle>
```

Thanks.

Commented Issue: AvalonDock Now Loses Alt Key Adornments [20882]

$
0
0
I've been using AvalonDock (2.0) for some time now, being key for managing documents in an IDE. In the last several months, I've noticed that Alt key adornments are no longer showing up for controls within AvalonDock, though the Alt key commands are executing as expected. See the image below where the Alt key adornments are showing up in the menu, but not for the buttons inside AvalonDock:

![Image](http://i.stack.imgur.com/KnomF.png)

What is particularly interesting about this issue, that it appears to be triggered by an environmental setting or condition.

As demonstrated in this [video](http://www.youtube.com/watch?v=D-S_PGJoTkc) (at 2:07), the alt key adornments are working for a control within AvalonDock. But, if I now use the very same executable I used in that video, the alt key adornments do not work.

I also built a very simple test application which loads a couple of documents of type Item, where Item is a simple class with a Name property:

```
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:avalonDock="clr-namespace:Xceed.Wpf.AvalonDock;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockLayout="clr-namespace:Xceed.Wpf.AvalonDock.Layout;assembly=Xceed.Wpf.AvalonDock"
xmlns:avalonDockControls="clr-namespace:Xceed.Wpf.AvalonDock.Controls;assembly=Xceed.Wpf.AvalonDock"
Title="MainWindow" Height="500" Width="500">
<Window.Resources>
<ResourceDictionary>
<DataTemplate DataType="{x:Type local:Item}">
<StackPanel Orientation="Vertical">
<Label Content="Item:" />
<TextBox Text="{Binding Name}"/>
<Button Content="_ClickMe" />
</StackPanel>
</DataTemplate>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<avalonDock:DockingManager Grid.Row="0" DocumentsSource="{Binding}">
<avalonDockLayout:LayoutRoot>
<avalonDockLayout:LayoutPanel Orientation="Horizontal">
<avalonDockLayout:LayoutDocumentPane/>
</avalonDockLayout:LayoutPanel>
</avalonDockLayout:LayoutRoot>
</avalonDock:DockingManager>
<Button Grid.Row="1" Content="_Test" />
</Grid>
</Window>
```

Even with this simple application, the Alt key adornments show up for the Test button outside of AvalonDock, but not for the ClickMe buttons for the controls within AvalonDock. I've also done this with the sample application here, so this seems for sure to be a bug.

Any ideas on how to correct or workaround this issue?
Comments: ** Comment from web user: moplus **

Nevermind, this is a Blend behavior (hadn't worked with those before). I got it working within the DataTemplates, such as:

```
<DataTemplate DataType="{x:Type cvm:HelpViewModel}">
<Grid>
<Interaction:Interaction.Behaviors>
<Library:FixKeyboardCuesBehavior/>
</Interaction:Interaction.Behaviors>
<ucon:HelpControl />
</Grid>
</DataTemplate>
```

If you are on stack overflow and want to post your answer there, I'll accept and upvote. :-)

http://stackoverflow.com/questions/20036898/avalondock-now-loses-alt-key-adornments

New Post: change DateTimeUpDown background OnMouseOver and IsPressed

$
0
0
i guess the problem is with me... i'm using a couple of resource dictionaries so i guess something is blocking the repeat button new style.
thanks for the help though.

Jonathan
Viewing all 4964 articles
Browse latest View live