xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
x:Class="WpfApplication1.Window1"
Title="Grid IsSharedSizeScope Sample">
First Column
Second Column
First Column
Second Column
//File:Window.xaml.cs
using System;
using System.Windows;
using System.Windows.Controls;
namespace WpfApplication1
{
public partial class Window1 : Window
{
public void setTrue(object sender, System.Windows.RoutedEventArgs e)
{
Grid.SetIsSharedSizeScope(dp1, true);
Console.WriteLine(Grid.GetIsSharedSizeScope(dp1).ToString());
}
public void setFalse(object sender, System.Windows.RoutedEventArgs e)
{
Grid.SetIsSharedSizeScope(dp1, false);
Console.WriteLine(Grid.GetIsSharedSizeScope(dp1).ToString());
}
}
}