Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Reference Tech Bites videos in C# markup docs #2197

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions doc/Learn/Markup/Overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@ You will quickly discover why C# Markup is a developer favorite with:
- Refactoring support
- Custom Controls and 3rd party libraries

<div style="position: relative; width: 100%; padding-bottom: 56.25%;">
<iframe
src="https://www.youtube-nocookie.com/embed/BC3c1qO_kbU"
morning4coffe-dev marked this conversation as resolved.
Show resolved Hide resolved
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
</iframe>
</div>

Let's jump in and take a look at a simple sample that displays 'Hello Uno Platform!' in the center of the screen:

```cs
Expand Down
11 changes: 11 additions & 0 deletions doc/Learn/Markup/Resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,17 @@ uid: Uno.Extensions.Markup.Resources

All `FrameworkElement`-inheriting types and `Application` have a couple of special extensions to help you manage your resources.

<div style="position: relative; width: 100%; padding-bottom: 56.25%;">
<iframe
src="https://www.youtube-nocookie.com/embed/W3P9Vd8QuGY"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
</iframe>
</div>

## Merging Resource Dictionaries

To merge resource dictionaries, you simply need to add a `ResourceDictionary` to the `Application` or `FrameworkElement` like:
Expand Down
11 changes: 11 additions & 0 deletions doc/Learn/Markup/Styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,17 @@ new Style<TextBlock>()
.Setters(s => s.FontSize(14))
```

<div style="position: relative; width: 100%; padding-bottom: 56.25%;">
<iframe
src="https://www.youtube-nocookie.com/embed/McQi0-JCciw"
title="YouTube video player"
frameborder="0"
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
allowfullscreen
style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;">
</iframe>
</div>

## Using Attached Properties

By default the C# Markup Generators will provide friendly extension methods for properties on the given type for `Style<T>`. This provides an API that is friendly and familiar to the XAML you might be used to as shown in the example above. Sometimes you may need to use Attached DependencyProperties for which there is no generated extension for `Style<T>`, in these cases you can simply call the Add method and pass in both the DependencyProperty and the value:
Expand Down
Loading