How to draw in a canvas a shape using a class

  • Thread starter Thread starter Shay_w
  • Start date Start date
S

Shay_w

Guest
Hi

This is my first app in uwp.

I try to draw a polygon by code in a canvas . i wrote a class named Classsevensegment and has a public method drawdigit

that draws a seven segment digit using polygon.

In the MainPage.xaml I placed a canvas named canvashunsec.

In the mainpage class i made an instance of Classsevensegment

Private digithundunitobj As Classsevensegment

Private Sub InitPanelTimer()
Dim brushseg As SolidColorBrush
brushseg = New SolidColorBrush(Windows.UI.Colors.SteelBlue)
digithundunitobj = New Classsevensegment(SEGMENTTIMER, brushseg)
canvashunsec.Width = digithundunitobj.GetwidthBox
canvashunsec.Height = digithundunitobj.GetHeightBox
End Sub

Private Sub MainPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
InitPanelTimer()
End Sub

I would like to use the digithundunitobj.drawdigit method in the canvashunsec

how to do this ?

Thanks

Continue reading...
 
Back
Top