|
Este artigo foi traduzido por máquina. Coloque o ponteiro do mouse sobre as frases do artigo para ver o texto original. Mais informações.
|
Tradução
Original
|
Propriedade FrameworkElement.ActualWidth
Namespace: System.Windows
Assembly: PresentationFramework (em PresentationFramework.dll)
Valor de propriedade
Tipo: System.Doubleprivate void changeWidth(object sender, SelectionChangedEventArgs args) { ListBoxItem li = ((sender as ListBox).SelectedItem as ListBoxItem); Double sz1 = Double.Parse(li.Content.ToString()); rect1.Width = sz1; rect1.UpdateLayout(); txt1.Text = "ActualWidth is set to " + rect1.ActualWidth; txt2.Text = "Width is set to " + rect1.Width; txt3.Text = "MinWidth is set to " + rect1.MinWidth; txt4.Text = "MaxWidth is set to " + rect1.MaxWidth; } private void changeMinWidth(object sender, SelectionChangedEventArgs args) { ListBoxItem li = ((sender as ListBox).SelectedItem as ListBoxItem); Double sz1 = Double.Parse(li.Content.ToString()); rect1.MinWidth = sz1; rect1.UpdateLayout(); txt1.Text = "ActualWidth is set to " + rect1.ActualWidth; txt2.Text = "Width is set to " + rect1.Width; txt3.Text = "MinWidth is set to " + rect1.MinWidth; txt4.Text = "MaxWidth is set to " + rect1.MaxWidth; } private void changeMaxWidth(object sender, SelectionChangedEventArgs args) { ListBoxItem li = ((sender as ListBox).SelectedItem as ListBoxItem); Double sz1 = Double.Parse(li.Content.ToString()); rect1.MaxWidth = sz1; rect1.UpdateLayout(); txt1.Text = "ActualWidth is set to " + rect1.ActualWidth; txt2.Text = "Width is set to " + rect1.Width; txt3.Text = "MinWidth is set to " + rect1.MinWidth; txt4.Text = "MaxWidth is set to " + rect1.MaxWidth; }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Função Server Core sem suporte), Windows Server 2008 R2 (Função Server Core com suporte com o SP1 ou posterior, Itanium sem suporte)
O .NET Framework não oferece suporte a todas as versões de cada plataforma. Para obter uma lista das versões com suporte, consulte .Requisitos de sistema do NET Framework.