Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. WCF and WF
  4. combobox problem

combobox problem

Scheduled Pinned Locked Moved WCF and WF
questionwpfwcfhelp
2 Posts 2 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    angels777
    wrote on last edited by
    #1

    hi.. how do i get the value of the selected combobox item? i do like this below <ComboBox x:Name="email" SelectedValuePath="@ProgID" SelectedIndex="0" IsEnabled="{Binding Path=IsEnabled, ElementName=NewButton}" HorizontalAlignment="Left" Margin="317.228,236,0,0" VerticalAlignment="Top" Width="67" Height="20" :LayoutOverrides="HorizontalAlignment" SelectionChanged="email_SelectionChanged" > <ComboBoxItem IsSelected="true" Content="Email "/> <ComboBoxItem Content="Email 2"/> <ComboBoxItem Content="Email 3" </ComboBox> --------------------------------------------------------------------------------------------------------------------------------- ComboBoxItem email_selection; email_selection = email.SelectedItem as ComboBoxItem; string emailsel = email_selection.Content.ToString(); if (emailsel == "Email") { contact_email.Visibility = Visibility.Visible; contact_email2.Visibility = Visibility.Hidden; contact_email3.Visibility = Visibility.Hidden; } is it this way? but why the response alwasy come late.. only i click many times then it will response..

    L 1 Reply Last reply
    0
    • A angels777

      hi.. how do i get the value of the selected combobox item? i do like this below <ComboBox x:Name="email" SelectedValuePath="@ProgID" SelectedIndex="0" IsEnabled="{Binding Path=IsEnabled, ElementName=NewButton}" HorizontalAlignment="Left" Margin="317.228,236,0,0" VerticalAlignment="Top" Width="67" Height="20" :LayoutOverrides="HorizontalAlignment" SelectionChanged="email_SelectionChanged" > <ComboBoxItem IsSelected="true" Content="Email "/> <ComboBoxItem Content="Email 2"/> <ComboBoxItem Content="Email 3" </ComboBox> --------------------------------------------------------------------------------------------------------------------------------- ComboBoxItem email_selection; email_selection = email.SelectedItem as ComboBoxItem; string emailsel = email_selection.Content.ToString(); if (emailsel == "Email") { contact_email.Visibility = Visibility.Visible; contact_email2.Visibility = Visibility.Hidden; contact_email3.Visibility = Visibility.Hidden; } is it this way? but why the response alwasy come late.. only i click many times then it will response..

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      can you please post a full example of your XAML and Code behind. If it is huge, then juse extract the necessary pieces and post it here so I can give you a hand.

      Cheers, Karl » CodeProject 2008 MVP My Blog | Mole's Home Page | How To Create Screen Capture Videos For Your Articles

      Just a grain of sand on the worlds beaches.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups