Гость
Целевая тема:
Создать новую тему:
Автор:
Форумы / WPF, Silverlight [игнор отключен] [закрыт для гостей] / Content + style + template / 2 сообщений из 2, страница 1 из 1
25.02.2011, 14:25
    #37135886
sealmu
Гость
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Content + style + template
Как
вынести в отдельный Assembly 3 файла(которые наверное должны быть ResouceDictionary) :

1) ControlTemplate.xaml - для шаблона(Template)

2) ControlStyles.xaml - стили(Style)

3) ControlContent.xaml - для Contrnt


А затем в окне применить их(с сылкой в окне на Assembly) через Style :
Код: csharp
1.
<Button Grid.Row="1" Margin="20" Style="{StaticResource Button_Style}"></Button>

который привяжет :
ControlTemplate.xaml --> Button.Template
ControlContent.xaml ->> Button.Content
ControlStyles.xaml --> Button.style
...
Рейтинг: 0 / 0
25.02.2011, 15:07
    #37136014
LR
LR
Участник
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Content + style + template
Код: plaintext
1.
2.
3.
4.
5.
<Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/MyAssembly1;component/.../ControlTemplate.xaml" />
                <ResourceDictionary Source="/MyAssembly2;component/.../ControlStyles.xaml" />
                <ResourceDictionary Source="/MyAssembly3;component/.../ControlContent.xaml" />
?
...
Рейтинг: 0 / 0
Форумы / WPF, Silverlight [игнор отключен] [закрыт для гостей] / Content + style + template / 2 сообщений из 2, страница 1 из 1
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]