xaml novinky ve windows 10

Post on 13-Apr-2017

611 Views

Category:

Software

1 Downloads

Preview:

Click to see full reader

TRANSCRIPT

XAML NOVINKY VE WINDOWS 10

Jiří DanihelkaMsFest 2015

NEW CONTAIRNESIN WINDOWS 10

Company Logo

SplitPane

SplitView

SplitView IsPaneOpen="True" IsPaneOpen="False"

DisplayMode="Inline"

DisplayMode="Overlay"

DisplayMode="CompactInline"

DisplayMode="CompactOverlay"

RelativePanel

RelativePanel

Pivot

Hub element

Hub element• <Hub Header=“Beaches of the World”>

<HubSection Width=“600” Header=“Latest travel news”></HubSection><HubSection>

...</HubSection>...

</Hub>

NEW CONTROLSIN WINDOWS 10

Company Logo

AppBar a CommandBar• <AppBar />

• <CommandBar />

• <AppBarButton Label="" Icon="" />

• <AppBarToggleButton IsChecked="" />

• <AppBarSeparator />

• Vektorové ikony<FontIcon Glyph="" />

AutoSuggestBox• <AutoSuggestBox

Name="myAutoSuggestBox" QueryIcon="Find" PlaceholderText="search here" TextChanged ="myAutoSuggestBox_TextChanged">

</AutoSuggestBox>

AutoSuggestBox• private string[] boxitems = new string[] { "January", "February", "March",

"April", "May", "June", "July", "August", "September", "October", "November", "December" }; var autoSuggestBox = (AutoSuggestBox)sender; var filtered = boxitems.Where(p => p.StartsWith(autoSuggestBox.Text,

StringComparison.OrdinalIgnoreCase)).ToArray(); autoSuggestBox.ItemsSource = filtered;

Date and Time Pickers• <CalendarView />• <DatePicker Date="" />• <TimePicker Time="" />

MapControl

<InkCanvas/>

PasswordBox• passwordBox.PasswordRevealMode = PasswordRevealMode.Peek;• passwordBox.PasswordRevealMode = PasswordRevealMode.Hidden;• passwordBox.PasswordRevealMode = PasswordRevealMode.Visible;

NEW DIALOGSIN WINDWOS 10

Company Logo

ContentDialog

Nastavení barev záhlaví okna• var v = Windows.UI.ViewManagement.ApplicationView.getForCurrentView();

v.titleBar.buttonBackgroundColor = Windows.UI.Colors.green;v.titleBar.buttonForegroundColor = Windows.UI.Colors.yellow;v.titleBar.backgroundColor = Windows.UI.Colors.indianRed;v.titleBar.foregroundColor = Windows.UI.Colors.cyan;

• var v = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView();var allProperties = v.GetType().GetRuntimeProperties();var titleBar = allProperties.FirstOrDefault(x => x.Name == "TitleBar");if (titleBar == null) return;dynamic titleBarInst = titleBar.GetMethod.Invoke(v, null);titleBarInst.BackgroundColor = Colors.CornflowerBlue;titleBarInst.ForegroundColor = Colors.Red;titleBarInst.ButtonBackgroundColor = Colors.DimGray;titleBarInst.ButtonForegroundColor = Colors.Orange;

Vypnutí záhlaví okna

• titleBarInst.ExtendViewIntoTitleBar = true;

GENERAL XAML IMPROVEMENTS

Company Logo

Compiled data bindings

• Umožňují kombinovat XAML a C#<TextBlock Text=“{x:Bind Zakaznik.Adresa.ToString()}” />

• Silně typová kontrola• Vyhodnotí se během kompilace• Je možné debugovat za běhu

XAML perspektivní transformace

Další zdroje informací• MVA: A Developer's Guide to Windows 10 – verze A• https://

mva.microsoft.com/en-US/training-courses/a-developer-s-guide-to-windows-10-12618

• MVA: Designing Your XAML UI with Blend – verze Bhttps://mva.microsoft.com/training-courses/a-developers-guide-to-windows-10

• Channel 9: Windows 10 development for absolute beginnershttps://channel9.msdn.com/Series/Windows-10-development-for-absolute-beginners

• EdX: Developing Windows 10 Universal Appshttps://www.edx.org/course/developing-windows-10-universal-apps-microsoft-dev209-1x

DOTAZY?

top related