もう用済みかもしれませんが・・・
以下でも動作しました。
〇サブウィンドウ
SliderWindow.xaml
<Window x:Class="BindingWindow.SliderWindow"
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:BindingWindow"
mc:Ignorable="d"
Title="SliderWindow" Height="450" Width="800">
<Grid>
<StackPanel VerticalAlignment="Center">
<Slider x:Name="sliderX"
Minimum="10"
Maximum="1000"
Margin="20"
Value="{Binding Width, Mode=TwoWay}" />
<Slider x:Name="sliderY"
Minimum="10"
Maximum="1000"
Margin="20"
Value="{Binding Height, Mode=TwoWay}" />
</StackPanel>
</Grid>
</Window>
〇呼び出し
MainWindow.xaml.cs
/// <summary>
/// MainWindow.xaml の相互作用ロジック
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
protected override void OnContentRendered(EventArgs e)
{
base.OnContentRendered(e);
new SliderWindow()
{
DataContext = this
}.Show();
}
}
Like!