Heim  >  Artikel  >  Web-Frontend  >  WPF-Stil im Bootstrap-Stil

WPF-Stil im Bootstrap-Stil

高洛峰
高洛峰Original
2016-12-29 13:11:371691Durchsuche

Einführung

Dieser Stil basiert auf Bootstrap-3.3.0. Die Anzahl der Quellcodezeilen in der Stildatei bezieht sich auf diese Version. Die CSS-Quelldatei wird in Bootstrap.css abgelegt der Inhaltsordner

WPF-Stile sind immer noch nicht mit CSS identisch, daher gibt es geringfügige Unterschiede in der Implementierung einiger Inhalte, die Verwendung einiger Inhalte ist unterschiedlich und einige Inhalte sind nicht implementiert

Aber zumindest einige Konzepte, Größen und Auswahlfarben sind immer noch eine gute Referenz

Die Blog-Beschreibung ist in der Reihenfolge der offiziellen Bootstrap-Dokumente verfasst

Die Ressource Bootstrap.xaml wird zitiert in App.xaml

<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/BootstrapWpfStyle;component/Styles/Bootstrap.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>

Schriftsatz

Titel

Effekt

WPF-Stil im Bootstrap-Stil

Code

<Label Content="h1. Bootstrap heading" Style="{DynamicResource h1}"></Label>
<Label Content="h2. Bootstrap heading" Style="{DynamicResource h2}"></Label>
<Label Content="h3. Bootstrap heading" Style="{DynamicResource h3}"></Label>
<Label Content="h4. Bootstrap heading" Style="{DynamicResource h4}"></Label>
<Label Content="h5. Bootstrap heading" Style="{DynamicResource h5}"></Label>
<Label Content="h6. Bootstrap heading" Style="{DynamicResource h6}"></Label>

Untertitel

Wirkung

WPF-Stil im Bootstrap-Stil

Code

<StackPanel Orientation="Horizontal">
<Label Content="h1. Bootstrap heading" Style="{DynamicResource h1}"></Label>
<Label Content="Secondary text" Style="{DynamicResource h1 small}"></Label>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Content="h2. Bootstrap heading" Style="{DynamicResource h2}"></Label>
<Label Content="Secondary text" Style="{DynamicResource h2 small}"></Label>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Content="h3. Bootstrap heading" Style="{DynamicResource h3}"></Label>
<Label Content="Secondary text" Style="{DynamicResource h3 small}"></Label>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Content="h4. Bootstrap heading" Style="{DynamicResource h4}"></Label>
<Label Content="Secondary text" Style="{DynamicResource h4 small}"></Label>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Content="h5. Bootstrap heading" Style="{DynamicResource h5}"></Label>
<Label Content="Secondary text" Style="{DynamicResource h5 small}"></Label>
</StackPanel>
<StackPanel Orientation="Horizontal">
<Label Content="h6. Bootstrap heading" Style="{DynamicResource h6}"></Label>
<Label Content="Secondary text" Style="{DynamicResource h6 small}"></Label>
</StackPanel>

Code

Inline-Code

< ;Label>-Stilcode. Fügen Sie ihn mit anderen

Effekten

WPF-Stil im Bootstrap-Stil

Benutzereingabe

<StackPanel Orientation="Horizontal">
<Label Content="内联代码:For example, "></Label>
<Label Content="<section>" Style="{DynamicResource code}"></Label>
<Label Content=" should be wrapped as inline."></Label>
</StackPanel>
Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn