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

New Post: Wizard Databinding

$
0
0
Hi,
yes, there is one. i forgott them by Copy and Paste Action.

Thanks
Peter

Created Unassigned: PropertyGrid: issues when SelectedObject implements INotifyDataErrorInfo [21153]

$
0
0
I'm using the PropertyGrid with various objects that implement INotifyDataErrorInfo. I was pleasantly surprised to find that the PropertyGrid hooks into this interface and displays a red border around the whole control if the SelectedObject is invalid; similarly it displays a red border around any individual properties that are invalid. However I have found a couple of issues relating to this:-

1) My object's property setters perform validation and updating the INotifyDataErrorInfo members accordingly, however after changing an invalid property value to a valid one, both of these red borders remain.

My workaround is to validate the entire object in the PropertyGrid's PropertyValueChanged event, but this highlights a second problem: the red border around the whole PropertyGrid disappears, but the red border around the property whose value has just been changed remains. My current workaround is to set SelectedObject to null then back to my object, which seems to refresh things.

2) The PropertyValueChanged event gets raised if I press Enter or if I click into a different property. However if I change a property's value then set focus to another control on the window, the underlying object's property gets updated but the PropertyValueChanged event does not fire, so I lose my "workaround" mentioned earlier. The PropertyGrid.LostFocus event doesn't seem to fire either, so I'm at a loss as to how else I can trap this situation.

New Post: WPF Datagrid Update/Refresh

$
0
0
So basically, what I'm trying to achieve here is to have the grid update dynamically when the underlying data changes.

After more extensive research, it seems that one of the causes of this issue is that the ObservableCollection doesn't implement the INotifyPropertyChanged interface. It notifies on when items are added/removed, etc. but not when an item's property has been modified. It was suggested by Jenny from Xceed that a BindingList could be used instead.

Although I've found this information, I'm still not really any closer to solving my problem. Because of performance issues, I've had to disable data virtualization, and my cell background and stuff are pretty much set only on the "realization" of the cells.

New Comment on "RichTextBox"

$
0
0
If you want a custom formatter with DataFormatters.XamlPackage: public class XamlPackageFormatter : ITextFormatter { public string GetText(System.Windows.Documents.FlowDocument document) { TextRange range = new TextRange(document.ContentStart, document.ContentEnd); try { using (MemoryStream rtfMemoryStream = new MemoryStream()) { using (StreamWriter rtfStreamWriter = new StreamWriter(rtfMemoryStream)) { range.Save(rtfMemoryStream, DataFormats.XamlPackage); rtfMemoryStream.Flush(); rtfMemoryStream.Position = 0; StreamReader sr = new StreamReader(rtfMemoryStream); return sr.ReadToEnd(); } } } catch (Exception) { throw; } } public void SetText(System.Windows.Documents.FlowDocument document, string text) { //if(text.StartsWith("PK")) => .XamlPackage if (text.Equals("")) return; TextRange range = new TextRange(document.ContentStart, document.ContentEnd); try { using (MemoryStream rtfMemoryStream = new MemoryStream()) { using (StreamWriter rtfStreamWriter = new StreamWriter(rtfMemoryStream)) { rtfStreamWriter.Write(text); rtfStreamWriter.Flush(); rtfMemoryStream.Seek(0, SeekOrigin.Begin); range.Load(rtfMemoryStream, DataFormats.XamlPackage); } } } catch (Exception) { throw; } } }

Created Unassigned: IsReadOnly and FormatBar-Visibility [21165]

$
0
0
__The FormatBar of the RichTextBox is visible (or "can be used") if the IsReadOnly-Property is true.__

This makes no sense, because I can not edit the text. And it seems to be that there´s no chance to prevent it. I tried to bind the FormatBar-Visibility to the IsReadOnly-Property but it does not work (I´m sure it´s because the Control sets the Visibility to true internally).

New Post: How to change the default time of date time picker from 12:00AM to 6:00AM in wpf

$
0
0
I want that everytime I click on a date it must default to 6:00AM instead of 12:00AM

New Post: AvalonDock - user-controlled ability to display document pane or not.

$
0
0
Hi.

I'm a newbie using AvalonDock, and would like to know if it is possible to 'dynamically' show or hide the LayoutDocumentPane based on user input.

In our application the end-user is basically responsible for creating the layout of a screen, and we give them a 'design mode', in which we make the DockingManager 'editable', allow them to drag on and arrange components (which we build).

One of the options available to them in design mode is to enable/disable Document mode, which basically toggles the ability and visibility of the LayoutDocumentPane.

My question is how would one best achieve this since IsVisible is readonly on the LayoutDocumentPane? I have tried setting the DockWidth to 0 to hide it to no avail.

Would I create 2 different LayoutPanels, one for each mode? And when switching to the disable Document Mode, i move all items from the DocumentsSource into the AnchorablesSource?

Any guidance appreciated.

New Post: AvalonDock - tabs that start on LeftSide or RightSide are pushed to the bottom if any item is selected as floating or pinned down

$
0
0
Hello. I'm a newcomer to the AvalonDock control and am investigating how we can incorporate it into our project. We have a specific region where we would like to put the AvalonDock, and we would like the "tabs" of a LayoutAnchorGroup to show up on the right side of the panel. In Kaxaml, I was playing with the source in the example provided in the AvalonDock documentation (https://wpftoolkit.codeplex.com/wikipage?title=AvalonDock&referringTitle=Home) and I modified the line...
<xcad:LayoutRoot.LeftSide>
...to...
<xcad:LayoutRoot.RightSide>
As expected, this put the tabs on the right side, but when I then make one of the LayoutAnchorables float, the remaining tabs (I added another tab for testing) get pushed to the bottom and the layout gets squished to the side. Note that this behavior is the same whether the tabs are on the LeftSide or the RightSide. It is only when the tabs are on the top or the bottom that the remaining tabs stay put when one is selected to float.

To eliminate Kaxaml as being the source of the problem, I then ported the code over to DevStudio2013. No joy; the same behavior was seen, even when the tabs were in their original position on the left. If I select one for floating, the other tab gets pushed to the bottom of the window. Furthermore, the tabs are pushed to the bottom of the screen if I pin any of the tabs down, or if I auto hide the item.

Is the pushing of the tabs to the bottom an expected behavior? If so, is there any way I can turn it off? In our application, we would like the tabs to consistently appear on the right side.

Thanks in advance for any assistance.

Created Unassigned: ExpandableObject Attribute Not Working in PropertyGrid [21170]

$
0
0
Good Day,

I am currently experiencing an issue with the WPF PropertyGrid. No Matter what i try i am unable to make my objects expandable within the control. - I see another user has experienced this too: https://wpftoolkit.codeplex.com/discussions/360804

I have created a simple project to illustrate the issue. - What am i missing here?

Thanks in advance for your help and all the great work.

Kind regards
Matthew Marlin

Commented Unassigned: ExpandableObject Attribute Not Working in PropertyGrid [21170]

$
0
0
Good Day,

I am currently experiencing an issue with the WPF PropertyGrid. No Matter what i try i am unable to make my objects expandable within the control. - I see another user has experienced this too: https://wpftoolkit.codeplex.com/discussions/360804

I have created a simple project to illustrate the issue. - What am i missing here?

Thanks in advance for your help and all the great work.

Kind regards
Matthew Marlin
Comments: ** Comment from web user: MatthewMarlin **

After further investigation, it would seem i made a vital mistake and forgot to initialize the NestedType.
After adding a Default constructor to the BaseType to initialize it, the property grid works as expected.

My bad.
Apologies, i cant seem to remove issues once created.

New Post: Multiline TextEditor keyboard focus on dropdown

$
0
0
Hello everybody,

in code behind, I would like to give keyboard focus on a multiline texteditor when this drops down.
More precisely, I'm catching the GotFocus event and setting IsOpen=True to drop down the control. At this point I would like to have the caret blinking on the texteditor area.
Pretty simple, it seemed to me before trying to achieve this... but I just can't get how to obtain my goal.

Any suggestion would be very appreciated.

Thanks in advance
Giacomo

Created Unassigned: LayoutAnchorable Transparent Background [21172]

$
0
0
One cannot get a transparent background on a LayoutAnchorable, in the Generic Theme.

You can set the color explicitly by setting a style on a LayoutAnchorableControl as follows:
```
<Style TargetType="{x:Type avalonDockCtls:LayoutAnchorableControl}">
<Setter Property="Background" Value="Blue" />
</Style>
```
However if you make the Background above transparent there is still a color applied. This color seems to be coming from the LayoutAnchorablePaneControl element, and one would expect that setting it's Background in a style would have the desired effect:
```
<Style TargetType="{x:Type avalonDockCtls:LayoutAnchorablePaneControl}">
<Setter Property="Control.Background" Value="Transparent" />
</Style>
```
The above has no effect however.

It seems that in all themes, except for generic theme, the AnchorablePaneControlStyle contains a Background binding as follows:
```
<Setter Property="Background" Value="{Binding Model.Root.Manager.Background, RelativeSource={RelativeSource Self}}"/>
```

The above changes the background to whatever the DockingManger itself is set to, while still allowing one to set the Individual LayoutAnchorableControl styles.

Therefore if the docking manager is transparent, so is the LayoutAnchorablePaneControl.

This allows whatever color is set on the Dockingmanager to flow to the LayoutAnchorableControl, and can be overridden there if need be.

Regards
Bradley

Patch Uploaded: #16639

$
0
0

BradleyB42000 has uploaded a patch.

Description:
Add a binding for the LayoutAnchorablePaneControl's background property, to set it to that of the Model.Root.Manager.Background.

Created Unassigned: XamlParseException at runtime on DateTimePicker [21175]

$
0
0
Hi,

I'm implementing the DateTimePicker in my project, using the toolkit.

However it complies without any issue on the namescpace, when I start the project, I have a XamlParseException on the Xaml tag <xctk:DateTimePicker>... telling me that it could not load the File or assembly Xceed....

I tried several things, such as deleting the XML namespace définitions in the XCeed Toolkit source project AssemblyInfo.cs, but wihtout any success....

Can someone help me ont this point ?

Thanks.

Commented Issue: Zoombox.Scale throws NullReferenceException [18713]

$
0
0
Setting Zoombox.Scale through XAML throws a NullReferenceException, whether thru a binding or literal value, and will crash the Visual Studio 2010 designer.
Comments: ** Comment from web user: cube45 **

Hi, I have the same problem that causes a crash in VS2012.
Here is a sample code I made to be sure the issue was in Zoombox and not in my code.
```
<Window x:Class="ZoomboxBug.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"
Title="MainWindow" Height="350" Width="525">
<Grid>
<xctk:Zoombox x:Name="Zoom">
<TextBlock Foreground="Black">Hello World</TextBlock>
</xctk:Zoombox>
</Grid>
</Window>
```

```
using System.Windows;

namespace ZoomboxBug {
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window {
public MainWindow() {
InitializeComponent();
this.Zoom.Scale = 1;
}
}
}
```

Extended.Wpf.Toolkit v 2.2.1 installed via NuGet

Regards,
cube45


New Post: CheckComboBox Not Displaying Checks

$
0
0
While the delimited string of selected items displays correctly, their associated checkboxes remain unchecked. Surely, I'm doing something wrong. I threw together the simplest demo I could to demonstrate the behavior. Any help would be appreciated.

Code Behind:
using System.Collections.ObjectModel;
using System.Windows;

namespace TestProject
{
    public partial class Test : Window
    {
        public Test()
        {
            InitializeComponent();
            
            var selectedOptions = new ObservableCollection<string>() { "One", "Two", "Three" };
            var selectableOptions = new ObservableCollection<SelectableOption>()
            {
                new SelectableOption {Display = "One", Value = "1"},
                new SelectableOption {Display = "Two", Value = "2"},
                new SelectableOption {Display = "Three", Value = "3"},
                new SelectableOption {Display = "Four", Value = "4"},
                new SelectableOption {Display = "Five", Value = "5"}
            };

            ComboBox.ItemsSource = selectableOptions;
            ComboBox.DisplayMemberPath = "Display";
            ComboBox.SelectedMemberPath = "Value";
            ComboBox.SelectedItemsOverride = selectedOptions;
        }

        public class SelectableOption
        {
            public string Display { get; set; }
            public string Value { get; set; }
        }
    }
}
and the XAML:
<Window x:Class="TestProject.Test"
        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"
        Title="Test" Height="178" Width="300">
    <Grid>
        <xctk:CheckComboBox  x:Name="ComboBox" 
                             Margin="10,33,10,0" 
                             VerticalAlignment="Top" 
                             TabIndex="3" 
                             Height="22"
                             RenderTransformOrigin="0.743,-1.136"
                             />
    </Grid>
</Window>

New Post: CheckComboBox Not Displaying Checks

$
0
0
Nevermind...

I needed to define an IsSelected property like:
public class SelectableOption
        {
            public string Display { get; set; }
            public string Value { get; set; }
            public bool IsSelected {get;set}
        }
...and instead of using the SelectedItemsOverride use the SelectedMemberPath="IsSelected"

New Comment on "DateTimeUpDown"

$
0
0
I am using a DateTimeUpDown control in my project and have found the following issue: Select an item in the editable portion of the control, say the word January. Notice that the selected area shows a nice blue background to indicate what you have selected. Use the mouse scroll wheel to change the Month. Notice the blue selection is maintained. Now use the up arrow or down arrow to change the Month. The blue selection is lost. Is there a workaround for this? This is a blocker for us.

New Post: ComboBox in CollectionControl

$
0
0
Does anyone know whether the above is possible or do I need to find a totally different solution?

Thanks

Created Unassigned: MVVM Memory Leak [21178]

$
0
0
When using DataTemplate automatic binding for view/viewmodel and DocumentSource property of the DockingManager binded to the list of viewmodel, when a document is closed, the corresponding view and viewmodel stay in memory.
Viewing all 4964 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>