Forum Replies Created

Viewing 15 posts - 16 through 30 (of 1,351 total)
  • Author
    Posts
  • Diane [Xceed]
    Moderator
    Post count: 1353

    Hi Nasheayah,

    Are you referring to AvalonDock.MVVMTestApp that can be found here:
    https://github.com/chandramouleswaran/AvalonDock

    If yes, I downloaded an ran that sample (making sure to reference the latest AvalonDock dll).

    No, using LayoutItemTemplateSelector or LayoutItemContainerStyleSelector are not needed to activate the LayoutUpdateStrategy event. Just make sure, like in the sample, that an avalonDock:DockingManager.LayoutUpdateStrategy is set.

    To test this sample:
    1) I put a breakpoint in LayoutInitializer.BeforeInsertAnchorable().
    2) I modified the Tools in Workspace to be an ObservableCollection<ToolViewModel> instead of a ToolViewModel[].
    3) I added a button in MainWindow.xaml where in its Button_click event, I did:

       var workspace = this.DataContext as Workspace;
       if( workspace != null )
       {
          ToolViewModel t = new ToolViewModel( "ABC" );
          workspace.Tools.Add( t );
       }

    Result: The breakpoint is hit when the button is clicked (when adding an item in Tools).

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi Rajesh,

    The fix will officially be included in v3.3 of the free community edition.

    In the meantime, go in the following file:
    Xceed.Wpf.Toolkit/DropDownButton/Implementation/DropDownButton.cs

    And remove the following line in the constructor:
    this.InheritanceBehavior = InheritanceBehavior.SkipToThemeNow;

    Please let us know if this modification correctly fixes the issue you are having with v3.2. Thank you.

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi Rajesh,

    We first need to check if this issue has already been fixed.

    Please download a trial of the current version of the Toolkit Plus here:
    http://forums.xceed.com/xceed-toolkit-plus-for-wpf/

    If the issue is still there with the current version, we would need a small stand-alone test project that reproduces the issue to help us investigate further. Please send it to support@xceed.com and include a link to this forum thread for reference. Thank you.

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi SezMe,

    I would recommend downloading a trial of the Toolkit Plus and the DataGrid for WPF, to see which datagrid is a better fit for your needs. Each includes a 45-day trial key to test the component. Also, with the DataGrid for WPF package, you will have access to the sample project I mentioned previously.

    Xceed Toolkit Plus for WPF
    http://forums.xceed.com/xceed-toolkit-plus-for-wpf/

    Xceed DataGrid for WPF
    http://forums.xceed.com/xceed-datagrid-for-wpf/

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi SezMe,

    You mention that you do not have the sample I mentioned. Just to be sure, are you using the Xceed DataGrid for WPF? or the datagrid found in the Xceed Toolkit Plus for WPF?

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi phil,

    You are using Xceed Zip for ActiveX and Xceed Ftp for ActiveX, is that right?

    If so, are you sure that the XceedZip.dll and XceedFtp.dll files have been registered on the target machines with regsvr32.exe?

    Another question. Is your application a 32-bit application? Please note that Xceed Ftp for ActiveX is compiled for 32-bit applications only. Xceed Zip for ActiveX is 32-bit only also, but we do have a 64-bit version, Xceed Zip for x64, that can be purchased separately.

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi ekorpinen,

    The unsigned value types (ULongUpDown, UShortUpDown, UIntegerUpDown and SByteUpDown) are included in the Toolkit. They will be available in the v3.6 version, which is currently planned for release in early January 2018.

    The next versions to be release are:
    – v3.6 for Plus users
    – v3.3 for Community users

    The Community version is always 2-3 versions behind the Plus version.
    Until the next release, you are using the LongUpDown/ShortUpDown the correct way to simulate a ULongUpDown/UShortUpDown.

    For Hex values, try removing the StringFormat in the binding and only use the FormatString property set to “{}0x{0:X4}”

       <xctk:LongUpDown Value="{Binding Path=ReadAddress}"
                        Minimum="0"
                        Maximum="65535"
                        FormatString="{}0x{0:X4}"
                        ParsingNumberStyle="HexNumber"
                        Margin="4" />

    I’m not sure what the UpdateEditText() and ValidateEditText() do in WinForms, but based on their documentation:
    – ValidateEditText: Validates and updates the text displayed in the spin box
    – UpdateEditText: Displays the current value of the spin box in the appropriate format.

    In the Toolkit for WPF, NumericUpDowns have OnValueChanged and OnTextChanged, which can be overriden, to detect or validate a text change or a value change.
    – the FormatString property is available to set the appropriate text format.
    – the Text property contains the current text value in the spin box.

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi SezMe,

    The problem is that the DataTemplate does not have access to static resources on the page, since the context of the DataTemplate is not the Xaml parser (and hence the page), but the column (and hence the DataGrid). Therefore, you need to provide a relative resource that points to the collection, normally a property on an object accessible to the DataGrid. Moreover, this type of scenario is normally handled through a ForeignKey, which the grid supports out of the box.

    You simply need to provide a ForeignKeyConfiguration on the column, and the editor will automatically display a ListBox. You can look at our TableView sample (default installation path: “C:\Xceed Samples\Xceed DataGrid for WPF v6.4\CSharp\TableView”) which demonstrates how to do this.

    It looks like :

       <Page.Resources>
          <ResourceDictionary>
    
             [...]
    
             <xcdg:ForeignKeyConfiguration x:Key="shipViaForeignKeyConfiguration"
                                           ItemsSource="{Binding Source={x:Static Application.Current},Path=Shippers}"
                                           ValuePath="ShipperID"
                                           DisplayMemberPath="CompanyName" />
          </ResourceDictionary>
       </Page.Resources>
       <xcdg:Column FieldName="ShipVia"
                    Title="Shipper"
                    ForeignKeyConfiguration="{StaticResource shipViaForeignKeyConfiguration}" />
    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi SezMe,

    Columns have both a CellContentTemplate and a CellEditor. The CellContentTemplate is only used for display, it is the template shown when the cell is not in edit mode.

    For the template used in edit mode, you must use the CellEditor instead. Also note that you must make use of the {xcdg:CellEditorBinding} for the binding to work correctly.

    For example:

       <xcdg:Column FieldName="test" ...>
          <xcdg:Column.CellEditor>
             <xcdg:CellEditor>
                <xcdg:CellEditor.EditTemplate>
                   <DataTemplate>
                      <TextBox Text="{xcdg:CellEditorBinding}" />
                   </DataTemplate>
                </xcdg:CellEditor.EditTemplate>
             </xcdg:CellEditor>
          </xcdg:Column.CellEditor>
       </xcdg:Column>
    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi jjacks,

    We have opened a fix request to review the situation. It will be fixed in the next release.

    In the meantime, you can go in the following file:

    Xceed.Wpf.Toolkit/Core/UIAutomation/TextBoxAutomationPeer.cs

    and replace its content with this:

       using System.Windows.Controls;
    
       namespace Xceed.Wpf.Toolkit.Core.UIAutomation
       {
          public class TextBoxAutomationPeer : System.Windows.Automation.Peers.TextBoxAutomationPeer
          {
             public TextBoxAutomationPeer( TextBox owner )
             : base( owner )
             {
             }
    
             protected override string GetClassNameCore()
             {
                return this.Owner.GetType().Name;
             }
    
             protected override string GetAutomationIdCore()
             {
                var value = base.GetAutomationIdCore();
                if( !string.IsNullOrEmpty( value ) )
                   return value;
    
                return this.GetNameCore();
             }
    
             protected override string GetNameCore()
             {
                return (( TextBox )this.Owner).Text;
             }
          }
       }
    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi jjacks,

    The IntegerUpDown is built with a WatermarkTextBox since around v2.0.
    Starting at v3.3, the UI Automation has been reviewed to expose every UI control.
    A WatermarkTextBox derives from an AutoSelectTextBox.

    We did a quick test with a sample containing a button and a WatermarkTextBox, and we looked at the result from “Inspect.exe”. We can see the content of the WatermarkTextBox in the properties “Name” and “AutomationId”.

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi,

    You may not be able to do what you wish using MVVM. To create columns dynamically, it must be done in code-behind. Unfortunately, these columns will have to be inserted in the column collection (DataGridControl.Columns). In order to do this, you will need either a reference to the DataGridControl instance, or the grid’s column collection instance. The DataGridControl.Columns collection is a read-only property and cannot be set by the user.

    Either way, you will need to have access to the grid instance somehow, which I think is against the MVVM philosophy. The same problem arises while building the hierarchy. The hierarchy is built from master-detail. You will have to create DetailConfiguration and insert these into the DataGridControl.DetailConfigurations or DetailConfiguration.DetailConfigurations collections. You may also have to create DetailDescription and insert them in the DataGridCollectionView.DetailDescriptions collection.

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi,

    Try setting the style of the StyleableWindow based on the default StyleableWindow. Here’s an example:

    <Application x:Class="WpfApplication199.App"
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:local="clr-namespace:WpfApplication199"
                xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                xmlns:xcpt="http://schemas.xceed.com/wpf/xaml/themes"
                xmlns:xctt="http://schemas.xceed.com/wpf/xaml/toolkit/themes"
                StartupUri="MainWindow.xaml">
      <Application.Resources>
        <ResourceDictionary>
          <ResourceDictionary.MergedDictionaries>
            <xcpt:MetroLightThemeResourceDictionary AccentColor="Green" />
            <xctt:ToolkitMetroLightThemeResourceDictionary AccentColor="Green"
                                                          LicenseKey="XXXXX-XXXXX-XXXXX-XXXX"/>
          </ResourceDictionary.MergedDictionaries>
    
        </ResourceDictionary>
      </Application.Resources>
    </Application>
    <xctk:StyleableWindow x:Class="WpfApplication199.MainWindow"
                          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                          xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                          xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                          xmlns:local="clr-namespace:WpfApplication199"
                          xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
                          mc:Ignorable="d"
                          Title="MainWindow"
                          Height="350"
                          Width="525"
                          Style="{StaticResource {x:Type xctk:StyleableWindow}}">
      <StackPanel>
        <Button Content="TEST"
                Margin="20"
                Click="Button_Click"/>
        <xctk:DoubleUpDown Value="38"
                          Margin="20" />
      </StackPanel>
    </xctk:StyleableWindow>

    Usually, only setting the content of App.xaml is enough so that when you will create any Toolkit control, it will have the correct look. You can try it by popping a new StyleableWindow (or any other control) when clicking on a button. But for the main Window, you need to set the style so it applies at startup.

    Diane [Xceed]
    Moderator
    Post count: 1353

    Hi Masc,

    Could you send us your test project by email?
    Please send it to support@xceed.com and include a link to this forum thread for reference.

    Thank you,
    Diane

    Diane [Xceed]
    Moderator
    Post count: 1353

    The Xceed DataGrid for WPF now supports cell merging through the new SpannedCells added in v6.4.

Viewing 15 posts - 16 through 30 (of 1,351 total)