Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1021275
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:17:14+00:00 2026-05-16T11:17:14+00:00

i know HTML/CSS and want to learn WPF styling. how can i get started.

  • 0

i know HTML/CSS and want to learn WPF styling. how can i get started. i see that padding, for example, works differently in WPF app.

in css:

padding: 5px 10px;

in XAML?

Padding="5px" 

i notice that i need to expand the width of the element eg. button myself to accomodate the padding? if so, how can i calculate the box model? the text has no line-height right? so if i have a font-size of 15px and padding of 5px, my height will be 25px?

and can i set different horizontal and vertical paddings?

how can i apply simple gradients. will it be very hard with just visual studio?

i appreciate links to tutorials or advice on getting started. if there is a HTML/CSS to WPF/XAML article or tutorial that will be even better!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:17:14+00:00Added an answer on May 16, 2026 at 11:17 am

    Padding is basically a Thickness structure, hence

    <MyControl Padding="left"/>
    
    <MyControl Padding="left,top"/>
    
    <MyControl Padding="left,top,right,bottom" ... />
    

    If you specify only left one its value is copied to top, right and bottom.
    If you specify left and top, left is copied to right and top to bottom ( like vertical and horizontal paddings)

    For simple gradients VS is OK.

    For a start, try to get around with xaml in code rather than using WYSIWYG tools like Blend. VS or XamlPad are good.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I know HTML&Css, Little Javascript & Little PHP. I really want to get in
I would like to know how css works under the hood. Whether the html
In how many ways we can give color info in X/HTML, css? I know
I know solutions exist to get HTML / CSS to PDF, but is there
I'm working on a little html/css framework that I can use for most of
I know the basics of html ans css, and now I want to make
I want to learn server-side scripting. Since I know some Python, probably that would
I want to know if there's a HTML/CSS only way to detect (or at
I currently have some modest HTML/CSS Know-How and want to improve from there. I
I don't know much css or html, so I have a question about taking

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.