XamlPadX를 사용하여 ComboBox의 defaultstyle을 복사하여 내 응용 프로그램 소스에 붙여 넣었습니다.스타일을 appingle 후 ComboBox를 열 수 없습니다.
이제는 더 이상 콤보 박스를 열 수 없습니다. 드롭 다운 버튼을 클릭해도 아무런 변화가 없습니다.
또 다른 문제는 나를 괴롭 히고 있습니다. 다음 줄에
"Value 'Control.Template' cannot be assigned to property 'Property'. 'IFrameworkInputElement' type does not have a matching DependencyObjectType.".
: 응용 프로그램의 컴파일 및 실행 입력해도, 디자이너는 나에게 오류 보여줍니다 때문에 디자이너가 나에게 컨트롤을 표시하지 않습니다이의
<ComboBox Name="modifier" SelectedIndex="0" Style="{DynamicResource MyComboStyle}">
<ComboBoxItem>1</ComboBoxItem>
<ComboBoxItem>2</ComboBoxItem>
<ComboBoxItem>3</ComboBoxItem>
</ComboBox>
을하지만 나타난다 앱을 실행하면 올바르게 작동합니다.
하지만 자신의 컨트롤과 콤보를 선언 할 때 어떤 디자이너 오류가 없습니다 :
<ComboBox x:Class="ModifierControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Style="{DynamicResource MyComboStyle}" >
</ComboBox>
그런 다음 어떤 디자이너 오류가 표시되지 않습니다는.
고맙습니다. :) – codymanix