0
CornerRadius 값을 바인딩하고 싶습니다.CornerRadius에서 Dependency 속성으로 바인딩
CornerRadius="{Binding CornerRadiusInfoBtn}"
이것은 TitleBar의 코드입니다.
그리고 내 재산입니다.
public CornerRadius CornerRadiusInfoBtn
{
get { return (CornerRadius)GetValue(CornerRadiusInfoBtnProperty); }
set { SetValue(CornerRadiusInfoBtnProperty, value); }
}
// Using a DependencyProperty as the backing store for CornerRadiusInfoBtn. This enables animation, styling, binding, etc...
public static readonly DependencyProperty CornerRadiusInfoBtnProperty =
DependencyProperty.Register("CornerRadiusInfoBtn", typeof(CornerRadius), typeof(TitleBar), new PropertyMetadata(new CornerRadius(0.0,0.0,2.0,2.0)));
하지만 둥근 모서리가 없습니다. 뭐가 문제 야?
둥근 모서리는 어디에 있습니까? CornerRadius 클래스 안에 있습니까? –
데이터 컨텍스트를'TitleBar'의 인스턴스로 설정하고 있습니까? – PoweredByOrange
0 이상의 값을 설정하면 모서리가 둥글게됩니다. – user3197157