Hatched Pattern Brush or Striped pattern in XAML Windows pHone - xaml

I am trying to get hatched pattern to fill inside a rectangle in Windows Phone application. I am trying code of WPF given here
WPF code for Hatched pattern in XAML
Is there any way except to use image to fill inside of a rectangle with hatched pattern brush?

Related

Vb.NET - Transparent elements in User Control

Does anybody know why this happens?
I've a TabControl where I insert UserControls but all the elements with white background create a hole in the WinForm and I can see the desktop...
The only way I find is to change Background color of elements but in some Element I've some visual bug.

Avalonia UI, creating a custom control by drawing things

One could create a control by starting from a container control (like panel) and add other existing controls (like buttons, textbox, etc) on it. But in some cases, there are no such suitable primitive controls and one has to draw things from scratch.
Avalonia UI's Visual Studio extension has a UserControl template, and it seems that it allows adding existing controls using XAML, which is the former case of the previous paragraph. But how to draw from scratch? Where is WinForm's OnPaint() equivalent or WPF's OnRender() equivalent? Is there any example of creating a control from scratch in Avalonia UI?
or WPF's OnRender() equivalent
It's called Render, the name is pretty much the only difference, DrawingContext's API closely resembles WPF one.

In which xaml controls you can draw

I try my first app in uwp vb.net i want to draw a few polygones.
Which control to use ?
The target is to draw a timer which each part minutes seconds are shown with seven segment.In windows form i used a picture box
Thanks
In which xaml controls you can draw
In UWP, we often use Canvas to defines an area within which you can explicitly position child objects. You could use Windows.UI.Xaml.Shapes to draw graph. It contains Line Ellipse and Rectangle etc. For more detail please refer this document.

Writing Arabic text in longlistselector in xaml

I am making a windows 8 phone app and I want to add arabic text items to a longlistselector. Its orientation is supposed to be right from left but I cannot get it to align in the proper direction. Is there a way in Windows 8 xaml to detect the reading order of the text and adjust alignment accordingly?
At the Window/Page level, add the following property
FlowDirection="RightToLeft"
This is a Bindable property, so it can be set at Application Level, and the changes reflected with minimal amount of code.

Custom button in Windows 8.1 app

I have a requirement to create a button in a Windows 8.1 app which has an icon and a text label. The icon will be a symbol from Segoe UI Symbols and the text label will be Segoe UI Semibold at a smaller text size.
I want to be able to reuse the button in different places within the app, using different icons and text labels.
How show I go about this? I could create a button and then edit the ContentPresenter to have a horizontally oriented stack panel with two TextBlocks, but then how could I reuse this? And how could I change the text in the two different text blocks?
Should I create a separate custom control with separate dependency properties for each of the textblock strings? I'm interested in hearing what you would do.
thanks
Create a simple Style. To make it easy, I would base it off the standardized AppBarButton style. You can format it to whatever size you want (I have done something similar to make a larger button or one with text on the side).
Have the main icon simply be a ContentPresenter which binds to the Content using a TemplateBinding. Make sure to set the FontFamily to Segoe UI Symbol. Have the text label pull from AutomationProperties.Name, similar to how the AppBarButton style does.
Then, whenever you want to use this just do:
<Button Style="{StaticResource MyCustomButtonStyle}"
Content="" // Where "000" is replaced by the number of the icon you wish to use.
AutomationProperties.Name="Text Label"/>
This should be extensible and easily reproducible to whatever location you need. When copying over the AppBarButton style, I suggest removing the artificial size limits (specifically the width of the main content Grid). I do suggest either giving the Text Label a fixed size or having it pull its size from the specified parent Width, so that it will Wrap correctly.
Hope this helps and happy coding!
Are you desiring to create something like for an AppBar? Take a look at AppBarButton and the style/types it supports. In Windows 8.1 we added some things around SymbolIcon specifically. Since you basically want two pieces of 'content' for your style you'll have to re-purpose one property (unless you create a custom control which doesn't sound needed for this scenario). Using AutiomationProperties.Name for the visible label is a good idea because it will also help with accessibility by default for those users.
Investigate the style for AppBarButton to get you started.