Community
Vault Forum
Welcome to Autodesk’s Vault Forums. Share your knowledge, ask questions, and explore popular Vault topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

VDS and events

0 REPLIES 0
Reply
Message 1 of 1
bjorn.nordle
195 Views, 0 Replies

VDS and events

Hi,

 

I'm trying to get an event to fire when a user changes a selection in a combo box. The goal is to change the appearance of the dialog depending on the value selected.

 

The combo box in question is in fact the default one from file.xaml,

        <ComboBox ItemsSource="{Binding Source={StaticResource DocTypes}, XPath=DocTypeInfo}"
          x:Name="DocTypeCombo"
          Grid.Row="2"
          Grid.Column="1"
          IsEnabled="{Binding IsNewEntryDialog}"
          DisplayMemberPath="DocName"
          SelectedValuePath="Path"
          SelectedValue="{Binding TemplatePath}"
          SelectedIndex="0">

 

 

Problem is, the value is not attached to a property as I can see, so I can't use ,

		$Prop["MyProperty"].add_PropertyChanged({
			MyPropertyOnChangedEvent 
		})	

 

Autodesk help has a page for this, but I can't seem to get the code-beind file correct: what is CustomerViewModelBase and how do I access "base.".

 

I tried adding this inside the <combobox> in xaml.

SelectionChanged="{Binding PsCmd[OnPropertyChanged_DocTypeCombo]}">

 I also tried 

 

        <ComboBox ItemsSource="{Binding Source={StaticResource DocTypes}, XPath=DocTypeInfo}"
          x:Name="DocTypeCombo"
          Grid.Row="2"
          Grid.Column="1"
          IsEnabled="{Binding IsNewEntryDialog}"
          DisplayMemberPath="DocName"
          SelectedValuePath="Path"
          SelectedValue="{Binding TemplatePath}"
          SelectedIndex="0"
SelectionChanged="OnSelectionChanged_DocTypeCombo"> </ComboBox> <x:Code> <![CDATA[ void OnSelectionChanged_DocTypeCombo(object sender, RoutedEventArgs e) { textblock.Text = "Hello World"; } ]]> </x:Code>

 

How should I solve this?

 

Regards,

Björn

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report