Skip to content

Commit

Permalink
Merge pull request #2197 from morning4coffe-dev/dev/doti/techbites-csm
Browse files Browse the repository at this point in the history
docs: Reference Tech Bites videos in C# markup docs
  • Loading branch information
agneszitte authored Apr 1, 2024
2 parents 9171c19 + 327cda3 commit 28068a5
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
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"
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

0 comments on commit 28068a5

Please sign in to comment.