Forums

Using with Blend
Last Post 07 Jan 2015 03:28 AM by Kenny. 4 Replies.
Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
KennyUser is Offline
New Member
New Member
Posts:10


--
06 Jan 2015 01:36 AM
    This sample in Store, it uses original controls in tool menu, and display it after Applying theme which defined in code.

    The thing is.. my artist want to design scene exactly same with running game screen.

    Is it possible? and Can you upload more sample like this (in Store) ?
    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:672


    --
    06 Jan 2015 10:12 AM
    So if I understand it correctly you want to see the same theme (default orange) in Blend like in the sample right?
    KennyUser is Offline
    New Member
    New Member
    Posts:10


    --
    06 Jan 2015 11:06 AM
    hmm It's ambigious.

    I saw you made theme already, but this is already made by code, using with original control.

    What I intend is.. designer should make ResourceDictionary as control Library to make scene.

    as you know, It begin with edit template.

    And after this work, some controls consists of Canvas, Rectangle, etc.. (ex: slider - thumb)

    You thanksfully answered this issue already (about customizing controls), but that solution looks working with code.

    May be I am not fully understand your solution, so it would be asking again, sorry





    Filip DušekUser is Offline
    Advanced Member
    Advanced Member
    Posts:672


    --
    06 Jan 2015 07:40 PM
    You can create Style or Style with Control Template in Blend. By creating style you change the look of control.

    If you look at Examples on GitHub there is Style called buttonStyle in Dictionary.xaml - http://github.com/EmptyKeys/UI_Exam...onary.xaml

    <Style x:Key="buttonStyle" BasedOn="{StaticResource {x:Type Button}}" TargetType="Button">
            <Setter Property="Background" Value="DarkOrange"/>
            <Setter Property="Width" Value="200" />
            <Setter Property="Padding" Value="2" />        
    </Style>
    


    This is very simple example how to change background, width and padding on button. Background can be ImageBrush so you can even use image (circle button etc.).

    All this is very similar to WPF - http://msdn.microsoft.com/en-us/lib...10%29.aspx
    There are some differences tho. Use Dynamic Resources, only normal Triggers are supported and Shapes are not supported, use images instead. If you use something, which is not supported UI Generator will generate error.
    KennyUser is Offline
    New Member
    New Member
    Posts:10


    --
    07 Jan 2015 03:28 AM
    umm.. I may try and test each controls for understand.

    Avoiding unsupported control will be the point.

    Thanks
    You are not authorized to post a reply.