이 어쩌면 ..
당신에게 도움이 ... Ctrl + Shift + B
을 시도하지만 난 당신이 마이크로 소프트 익스프레션 블렌드를 설치하는 권 해드립니다. 그리고 모든 Xaml 마크 업을 만듭니다.
업데이트 :
또는 당신이 사용할 수 있습니다
public class VisibilityFixer: DependencyObject
{
public static bool GetFixDesigner(DependencyObject obj)
{
return (bool)obj.GetValue(FixDesignerProperty);
}
public static void SetFixDesigner(DependencyObject obj, bool value)
{
obj.SetValue(FixDesignerProperty, value);
}
// Using a DependencyProperty as the backing store for FixDesigner. This enables animation, styling, binding, etc...
public static readonly DependencyProperty FixDesignerProperty =
DependencyProperty.RegisterAttached("FixDesigner", typeof(bool), typeof(VisibilityFixer),
new UIPropertyMetadata(false, new PropertyChangedCallback(PropertyChanged)));
public static void PropertyChanged(DependencyObject sender, DependencyPropertyChangedEventArgs e)
{
var obj = sender as FrameworkElement;
if (obj != null)
{
if ((bool)(DesignerProperties.IsInDesignModeProperty.GetMetadata(typeof(DependencyObject)).DefaultValue))
{
if (obj.Visibility == Visibility.Collapsed)
{
obj.Opacity = 0;
obj.Height = 0;
obj.Width = 0;
}
else if (obj.Visibility == Visibility.Hidden)
{
obj.Opacity = 0;
}
}
}
}
}
과 같이 사용 ..
<StackPanel x:Name="LayoutRoot">
<TextBlock TextWrapping="Wrap"
Visibility="Collapsed"
fx:VisibilityFixer.FixDesigner="True"
Text="TextBlock3243" HorizontalAlignment="Left"
Background="Red" />
<TextBlock HorizontalAlignment="Left" TextWrapping="Wrap"><Run Text="TextBlock"/></TextBlock>
</StackPanel>
후 사용 Ctrl + Shift + B
좋은 캐치지만 여전히 문제는 아닌지 의심 스럽습니다. 나는 그것이 내게 원하는 기능인 것 같다. – Rohit
이것은 다른 컴퓨터에서 정상적으로 작동하므로이 특정 설치에 문제가 있다고 생각합니다. 나는 그 일을 해결할 수는 있지만, 다른 일이 깨지면 걱정이된다. – Goran