×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Sep 2013
    Posts
    13

    Question Shapes be Invisible

    i met a problem with my custom live tile.

    i created a UserControl to work as a image template of the live tile background image. The xaml is like this:
    <Grid x:Name="LayoutRoot" Background="{Binding Color}" >
    <Ellipse Margin="101" Stroke="White" StrokeThickness="2"/>
    <es:Arc EndAngle="{Binding EndAngle}" StrokeThickness="8" Margin="101"/>
    <TextBlock Text="{Binding Count}" >
    </Grid>

    i rendered it to a WriteableBitmap, and saved it as a jpg file in isolated storage. But the arc was not showing in the jpg file, while the Ellipse and the TextBlock were visible.

    what's wrong? i tried adding some shapes in Microsoft.Expression.Shapes to this usercontrol, and they were all invisible too when saved as a jpg file.

    can anybody help me

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    544

    Re: Shapes be Invisible

    Have you tried adding this to a regular page within a Windows Phone app to see if the code draws the shape normally?

    Also, do the shapes have a fill colour?

  3. #3
    Registered User
    Join Date
    Sep 2013
    Posts
    13

    Re: Shapes be Invisible

    Yes, of course. I just omit some xaml codes. The arc shape has stroke brush.

    I took your advice and put it in a regular page.It worked well.

    It draws perfectly in Expression Blend. So i got confused with it.


    Quote Originally Posted by theothernt View Post
    Have you tried adding this to a regular page within a Windows Phone app to see if the code draws the shape normally?

    Also, do the shapes have a fill colour?

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    510

    Re: Shapes be Invisible

    You should not omit part of the code that is used when having the problem, it makes diagnosing the issue a lot harder. If you render the above control into a WritableBitmap and display that inside an Image Control, I guess you don't see them as well. The JPEG encoding should not really be part of the problem.

  5. #5
    Registered User
    Join Date
    Sep 2013
    Posts
    13

    Re: Shapes be Invisible

    Okay...i am sorry for omitting the code.

    You are right. It is not the problem of JPEG encoding.

    I suspect it's the problem of Microsoft.Expression.Shapes. Actually, sometimes i open this UserControl in Expression Blend, and the arc shape becomes invisible for no reason(usually it draws well).

    Quote Originally Posted by SB Dev View Post
    You should not omit part of the code that is used when having the problem, it makes diagnosing the issue a lot harder. If you render the above control into a WritableBitmap and display that inside an Image Control, I guess you don't see them as well. The JPEG encoding should not really be part of the problem.

  6. #6
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    544

    Re: Shapes be Invisible

    Quote Originally Posted by Fewarry View Post
    I suspect it's the problem of Microsoft.Expression.Shapes. Actually, sometimes i open this UserControl in Expression Blend, and the arc shape becomes invisible for no reason(usually it draws well).
    Are you testing the shape (on the test page) on a device or simulator - Expression Blend's preview can't be trusted all the time.

  7. #7
    Registered User
    Join Date
    Sep 2013
    Posts
    13

    Re: Shapes be Invisible

    Yeah. I tested many times on both my phone and the emulator. So i felt helpless about this problem.

    I think i should post the some pictures.

    the original design in Expression Blend


    the jpg saved through WritableBitmap


    Quote Originally Posted by theothernt View Post
    Are you testing the shape (on the test page) on a device or simulator - Expression Blend's preview can't be trusted all the time.

  8. #8
    Nokia Developer Champion
    Join Date
    Sep 2012
    Location
    Morocco
    Posts
    295

    Re: Shapes be Invisible

    Can you please test rendering the shapes "only", and also try rendering the control when the event "Loaded" of the Shape element fires

Similar Threads

  1. Creating different shapes button?
    By Niamita in forum [Archived] Beginning Qt
    Replies: 5
    Last Post: 2011-05-04, 12:37
  2. Best way to draw lines/shapes on screen ?
    By tinkywinky in forum Symbian
    Replies: 6
    Last Post: 2009-07-09, 14:28
  3. Detecting shapes
    By gmkumar2005 in forum Symbian
    Replies: 1
    Last Post: 2009-03-10, 12:06
  4. <newbie> moving shapes smoothly
    By doesitmatter in forum Symbian Media (Closed)
    Replies: 3
    Last Post: 2007-07-30, 18:32
  5. Geometric Shapes Unicode Problem
    By Bara.ALnsour in forum Mobile Java General
    Replies: 8
    Last Post: 2006-11-20, 14:40

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×