Page 2 of 2 FirstFirst 12
Results 16 to 18 of 18
  1. #16
    Jason's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    /dev/null
    Posts
    5,704
    Reputation
    918
    Thanks
    7,676
    My Mood
    Mellow
    Quote Originally Posted by t7ancients View Post
    So all the themes I see in the VB section are just custom controls? Sounds like a weird hack, you'd think there's an easier way, even with plain old Windows Forms. For XAML in WPF, is there an equivalent to style sheets? That would be absolutely tits. Excuse my ignorance, haven't looked into GUI stuff much because it never really mattered to me, but now when I show my friends my programs and they see the console they're just like "... wuts dat." so I think I need to build some design skills. :/
    What do you mean "weird hack"? Microsoft have already done the heavy lifting with 99% of the existing controls (events, behaviours etc), all you need to do is derive from the existing classes and alter the appearance. Inheritance isn't a "weird hack" and method overriding isn't either. It's a lot less effort than re-inventing every single control from the ground up.

    This is the kind of thing that inheritance is good for; retain 99% of the code from the parent class, alter 1% to better suit your needs.

    XAML doesn't use "style sheets", but you can create named styles in your resources, and even extend on existing styles using the "BasedOn" attribute. Once you have these styles, you can apply them to your XAML elements.

    A basic example of a custom border:

    Code:
    <Style x:Key="InteractionPanelBorder" TargetType="Border">
        <Setter Property="BorderThickness" Value="1,1,1,1" />
        <Setter Property="BorderBrush" Value="Black" />
        <Setter Property="Margin" Value="0" />
    </Style>
    Then you can apply it to any element which derives from "Border"
    Code:
    <Border Style="{StaticResource InteractionPanelBorder}">
        <!-- blah -->
    </Border>
    Last edited by Jason; 01-10-2013 at 07:07 PM.

    Quote Originally Posted by Jeremy S. Anderson
    There are only two things to come out of Berkley, Unix and LSD,
    and I don’t think this is a coincidence
    You can win the rat race,
    But you're still nothing but a fucking RAT.


    ++Latest Projects++
    [Open Source] Injection Library
    Simple PE Cipher
    FilthyHooker - Simple Hooking Class
    CLR Injector - Inject .NET dlls with ease
    Simple Injection - An in-depth look
    MPGH's .NET SDK
    eJect - Simple Injector
    Basic PE Explorer (BETA)

  2. #17
    t7ancients's Avatar
    Join Date
    Dec 2008
    Gender
    male
    Location
    New York
    Posts
    381
    Reputation
    28
    Thanks
    68
    My Mood
    Twisted
    Quote Originally Posted by Jason View Post


    What do you mean "weird hack"? Microsoft have already done the heavy lifting with 99% of the existing controls (events, behaviours etc), all you need to do is derive from the existing classes and alter the appearance. Inheritance isn't a "weird hack" and method overriding isn't either. It's a lot less effort than re-inventing every single control from the ground up.

    This is the kind of thing that inheritance is good for; retain 99% of the code from the parent class, alter 1% to better suit your needs.

    XAML doesn't use "style sheets", but you can create named styles in your resources, and even extend on existing styles using the "BasedOn" attribute. Once you have these styles, you can apply them to your XAML elements.

    A basic example of a custom border:

    Code:
    <Style x:Key="InteractionPanelBorder" TargetType="Border">
        <Setter Property="BorderThickness" Value="1,1,1,1" />
        <Setter Property="BorderBrush" Value="Black" />
        <Setter Property="Margin" Value="0" />
    </Style>
    Then you can apply it to any element which derives from "Border"
    Code:
    <Border Style="{StaticResource InteractionPanelBorder}">
        <!-- blah -->
    </Border>
    It just seems like a weird way to have to do things just to change the appearance of a control, that's all(I thought that their appearance could be controlled via members of their respective classes). XAML looks better to me all the time, though. It's as I said, I know next to nothing when it comes to GUI stuff, I never mess with it because it seemed the least important to me.

  3. #18
    AxiomFlux's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    EST
    Posts
    406
    Reputation
    10
    Thanks
    406
    My Mood
    Amazed
    Quote Originally Posted by t7ancients View Post
    It just seems like a weird way to have to do things just to change the appearance of a control, that's all(I thought that their appearance could be controlled via members of their respective classes). XAML looks better to me all the time, though. It's as I said, I know next to nothing when it comes to GUI stuff, I never mess with it because it seemed the least important to me.
    GUI is just the way you want to present your project. console is just plain and not exciting.

Page 2 of 2 FirstFirst 12

Similar Threads

  1. [Discussion] your opinions please (best ones = free accounts)
    By CFLESSONS in forum CrossFire Discussions
    Replies: 16
    Last Post: 05-14-2012, 04:23 PM
  2. give me your opinion
    By crappy74 in forum General
    Replies: 6
    Last Post: 10-28-2011, 09:23 PM
  3. Replies: 17
    Last Post: 10-11-2010, 10:50 AM
  4. MPGH, Your Opinion Please
    By R3V in forum General
    Replies: 14
    Last Post: 03-06-2010, 05:30 AM