locked
Expression Blend Designer BUG RRS feed

  • Question

  • Hi,

    Expression Blend Designer crushes if relativesource binding is used inside control template:

                        <ControlTemplate  TargetType="Controls:MyControl">
                            <Grid d:DesignWidth="474" d:DesignHeight="147">
                                <Slider Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MyControlProperty, Mode=TwoWay }"
                                        />
                            </Grid>
                        </ControlTemplate>

    Thanks,
    Alexey Zakharov
    Wednesday, August 12, 2009 8:51 AM

All replies

  • Could you please give us some more information?

    Thanks,
    Unni

    a) What version of Blend are you using?
    b) I tried this with the following XAML, and it worked:

    Create new WPF project
    Paste the following XAML (it worked for me - is there a specific project that I need to setup for this to repro?)

    <Window
     xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
     xmlns:Microsoft_Windows_Themes="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
     x:Class="WpfApplication6.MainWindow"
     x:Name="Window"
     Title="MainWindow"
     UseLayoutRounding="True"
     Width="640" Height="480" mc:Ignorable="d">

     <Window.Resources>
      <Style TargetType="{x:Type Button}">
       <Setter Property="Template">
        <Setter.Value>
         <ControlTemplate  TargetType="Button">
                            <Grid d:DesignWidth="474" d:DesignHeight="147">
                                <Slider Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=MyControlProperty, Mode=TwoWay }"
                                        />
                            </Grid>
                        </ControlTemplate>
        </Setter.Value>
       </Setter>
      </Style>
     </Window.Resources>

     <Grid x:Name="LayoutRoot">
      <Button Content="Button" Margin="192,156,235,177"/>
     </Grid>
    </Window>


    This posting is provided "AS IS" with no warranties, and confers no rights.
    Thursday, August 13, 2009 1:44 AM
  • I'm using Silverlight 3 with Blend 3.
    Thursday, August 13, 2009 3:25 AM