locked
IValueconverter is not firing RRS feed

  • Question

  • Here is my xaml below. The DisplayUnitConverter is not firing when I click the radio buttons.Can someone assist me to see what I am doing wrong?
     
    <Window x:Class="DisplayUnitClient.MainWindow"
    xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"
    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:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
    xmlns:dxn="http://schemas.devexpress.com/winfx/2008/xaml/navbar"
    xmlns:dxlc="http://schemas.devexpress.com/winfx/2008/xaml/layoutcontrol"
    xmlns:DisplayUnitClient ="clr-namespace:DisplayUnitClient"
    mc:Ignorable="d"
    Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
    <DisplayUnitClient:DisplayUnitConverter x:Key="DisplayUnitConverter" />
    </Window.Resources>
    <Grid>
    <dxe:SpinEdit x:Name="spinEditMaxHatchSpeed" Height="{Binding ActualHeight, ElementName=label}" AllowDefaultButton="False" Value="{Binding MaxHatchSpeed, ElementName=groupBoxDisplaySettings, Converter={StaticResource DisplayUnitConverter}, Mode=TwoWay}" Margin="0,0,0,285">
    <dxe:ButtonInfo IsLeft="True" Content="&lt;" Command="{Binding SpinDownCommand, RelativeSource={RelativeSource AncestorType={x:Type dxe:SpinEdit}, Mode=FindAncestor}}"/>
    <dxe:ButtonInfo Content="&gt;" Command="{Binding SpinUpCommand, RelativeSource={RelativeSource AncestorType={x:Type dxe:SpinEdit}, Mode=FindAncestor}}"/>
    </dxe:SpinEdit>
    <GroupBox x:Name="groupBoxDisplaySettings" Header="Display Units" HorizontalAlignment="Stretch" VerticalAlignment="Top" FontSize="16" Margin="0,39,10,0">
    <StackPanel HorizontalAlignment="Left" VerticalAlignment="Center" Orientation="Vertical" Width="349" >
    <Label Content="Max Hatch Speed:" />
    <RadioButton Margin="0,0,20,0" Content="Millimeters" Name="MillimeterDisplayUnitButton" GroupName="DisplayUnits" Click="DisplayUnitMode_Clicked" Tag="0"/>
    <RadioButton Content="Inches" Name="InchesDisplayUnitButton" GroupName="DisplayUnits" Click="DisplayUnitMode_Clicked" Tag="1" />
    </StackPanel>
    </GroupBox>
    </Grid>
    </Window>
     

    pianoboyCoder

    Wednesday, April 15, 2020 6:15 AM

All replies

  • Hi pianoboyCoder,
    I viewed your description and it is related to WPF. So it is recommended to ask the questions in Microsoft Q&A forum and you can get more professional answer.
    Thank you for your understanding.
    Best Regards,
    Daniel Zhang


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, April 15, 2020 7:29 AM
  • Thank you. I just updated forum

    pianoboyCoder

    Wednesday, April 15, 2020 12:11 PM