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 7926929
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T19:03:04+00:00 2026-06-03T19:03:04+00:00

I am new to WPF. I have this code <Window x:Class=ElementBinding.MultipleBindings xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Title=MultipleBindings

  • 0

I am new to WPF. I have this code

<Window x:Class="ElementBinding.MultipleBindings"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MultipleBindings" Height="320" Width="300">
    <Grid>
        <Slider Name="sliderFontSize" Margin="0,12,6,243"
                Minimum="1" Maximum="40" Value="10"
                TickFrequency="1" TickPlacement="TopLeft">
        </Slider>
        <TextBox Name="txtContent" Margin="0,44,0,208">Color should change here</TextBox>
        <TextBlock Margin="3,150,3,3" Name="lblSampleText"
                    FontSize="{Binding ElementName=sliderFontSize, Path=Value}"
                    Text="{Binding ElementName=txtContent, Path=Text,Mode=TwoWay}"
                    Foreground="{Binding ElementName=lstColors, Path=SelectedItem.Tag}" >
        Multiple Bindings
        </TextBlock>
        <ListBox Height="54" HorizontalAlignment="Left" Margin="12,90,0,0" Name="lstColors" VerticalAlignment="Top" Width="120" >
            <ListBoxItem>Green</ListBoxItem>
            <ListBoxItem>Red</ListBoxItem>
            <ListBoxItem>Blue</ListBoxItem>
        </ListBox>
    </Grid>
</Window>

Text block will not appear if I select an item in list box. I think problem is in ‘SelectedItem.Tag’. How can I resolve this?

  • 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-06-03T19:03:06+00:00Added an answer on June 3, 2026 at 7:03 pm

    You are correct. It should be Path=SelectedItem.Content:

    <TextBlock Margin="3,150,3,3" Name="lblSampleText"
                    FontSize="{Binding ElementName=sliderFontSize, Path=Value}"
                    Text="{Binding ElementName=txtContent, Path=Text,Mode=TwoWay}"
                    Foreground="{Binding ElementName=lstColors, Path=SelectedItem.Content}" >
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this custom wpf user control: ShowCustomer.xaml: <UserControl x:Class=TestControlUpdate2343.Controls.ShowCustomer xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml> <Grid> <TextBlock
I have encountered something very strange, simple WPF application <Window x:Class=ListBoxSelection.MainWindow xmlns=http://schemas.microsoft.com/winfx/2006/xaml/presentation xmlns:x=http://schemas.microsoft.com/winfx/2006/xaml Title=MainWindow
I am new to WPF. I have a code which displays a UI window
I am NEW to WPF. I have the following XAML code: </Window> ... <Canvas>
In my application (WPF) i have this window: public partial class Window1 : Window
I have been trying to reproduce this example: http://www.codeproject.com/KB/WPF/TreeViewWithViewModel.aspx For some reason my treeview
I'm rather new to WPF, so maybe this is a simple question. I have
I have problem with WPF - I'm quiet new in this smart technology. So
I'm new to WPF. I have a WPF Window with a bunch of Labels
I am using a base Window class in a WPF project. In the code

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.