Click here to Skip to main content
16,011,804 members
Home / Discussions / WPF
   

WPF

 
AnswerRe: how to create own set of tool palette? Pin
Michael Sync28-May-08 20:10
Michael Sync28-May-08 20:10 
GeneralRe: how to create own set of tool palette? Pin
katelva3-Jun-08 19:51
katelva3-Jun-08 19:51 
GeneralRe: how to create own set of tool palette? Pin
Michael Sync4-Jun-08 20:58
Michael Sync4-Jun-08 20:58 
QuestionWalking the Visual Tree ... Pin
Jammer28-May-08 4:07
Jammer28-May-08 4:07 
QuestionRe: Walking the Visual Tree ... Pin
Jammer29-May-08 3:13
Jammer29-May-08 3:13 
AnswerRe: Walking the Visual Tree ... Pin
Insincere Dave29-May-08 6:03
Insincere Dave29-May-08 6:03 
GeneralRe: Walking the Visual Tree ... Pin
Jammer29-May-08 6:31
Jammer29-May-08 6:31 
GeneralRe: Walking the Visual Tree ... Pin
Insincere Dave29-May-08 6:53
Insincere Dave29-May-08 6:53 
What is the value you are after?
<Window x:Class="WpfApplication1.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="300">
    <Window.Resources>
        <Style x:Key="TextBox.Default" TargetType="{x:Type TextBox}">
            <Setter Property="FontFamily" Value="Century Gothic"/>
            <Setter Property="FontSize" Value="40" />
        </Style>
    </Window.Resources>
    <Grid>
        <TextBox x:Name="EnabledTextBox" Style="{DynamicResource TextBox.Default}" ToolTip="TextBox" Text="Hello World!" TextWrapping="NoWrap" Margin="4,4,4,4" IsEnabled="True"/>
    </Grid>
</Window>


var value = EnabledTextBox.GetValue(StyleProperty) as Style;
if (value != null)
{
    foreach(Setter s in value.Setters)
    {
        Console.WriteLine(s.Property + " = " + s.Value);
    }
}


Outputs
FontFamily = Century Gothic
FontSize = 40
GeneralRe: Walking the Visual Tree ... Pin
Jammer29-May-08 7:53
Jammer29-May-08 7:53 
QuestionAbout Web Camara Pin
viralsarvaiya28-May-08 3:30
viralsarvaiya28-May-08 3:30 
AnswerRe: About Web Camara Pin
Michael Sync28-May-08 5:41
Michael Sync28-May-08 5:41 
AnswerRe: About Web Camara Pin
Michael Sync28-May-08 14:17
Michael Sync28-May-08 14:17 
QuestionAlternative namespace for mx.messaging.MessageAgent in Silverlight Pin
am 200928-May-08 0:15
am 200928-May-08 0:15 
AnswerRe: Alternative namespace for mx.messaging.MessageAgent in Silverlight Pin
Michael Sync28-May-08 5:38
Michael Sync28-May-08 5:38 
Questionconversion from ActionScript3 to Silverlight Pin
am 200927-May-08 19:41
am 200927-May-08 19:41 
AnswerRe: conversion from ActionScript3 to Silverlight Pin
Michael Sync28-May-08 5:37
Michael Sync28-May-08 5:37 
QuestionCreate a TreeViewItem outside the main thread Pin
Lutosław27-May-08 9:02
Lutosław27-May-08 9:02 
AnswerRe: Create a TreeViewItem outside the main thread Pin
Pete O'Hanlon27-May-08 9:16
mvePete O'Hanlon27-May-08 9:16 
QuestionMemory problem with Frame objects Pin
Super Lloyd27-May-08 5:43
Super Lloyd27-May-08 5:43 
QuestionTreeView using XAML code in WPF Pin
Arijit Manna26-May-08 3:15
Arijit Manna26-May-08 3:15 
QuestionStarting with Silverlight Pin
Zeeshan Riaz25-May-08 10:22
Zeeshan Riaz25-May-08 10:22 
AnswerRe: Starting with Silverlight Pin
Michael Sync26-May-08 4:28
Michael Sync26-May-08 4:28 
AnswerRe: Starting with Silverlight Pin
bilal haider5-Jun-08 19:56
bilal haider5-Jun-08 19:56 
Questionhyperlink navigateuri not working. Please help. Pin
ankur_gupta55524-May-08 22:59
ankur_gupta55524-May-08 22:59 
AnswerRe: hyperlink navigateuri not working. Please help. Pin
User 27100925-May-08 1:03
User 27100925-May-08 1:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.