I’ve started messing around in wpf a little bit, so it might be that my question is actually has a super easy answer but it really has me stumped!
I have a basic recorder application, but I don’t want the end user to have acces to all the genAPI nodes. Also, Iwould like some of them to be bound to different GUI elements (like sliders for exposure for example).
Two things go awry though which might be related to each other. I can’t seem to get the min, max and increment values of the slider bound to the node value to update dynamically. If for instance exposure decreases, it would be nice if the slider for framerate also changes, but for some reason it does not.
Something similar happens when I rediscover a camera; changing the sliders no longer seems to be linked to the orignial node?
So this would be what one of my sliders looks like in xaml;
<<DockPanel VerticalAlignment="Center">
<Label Content="Exposure" Margin="10" VerticalAlignment="Center" Width="65"/>
<TextBox Text="{Binding ElementName=ExposureSlider, Path=Value, UpdateSourceTrigger=PropertyChanged}" DockPanel.Dock="Right" VerticalAlignment="Center" Width="40" Margin="10"/>
<Slider Value="{Binding exposureTime.Value}" Name ="ExposureSlider" Maximum="{Binding exposureTime.Max, UpdateSourceTrigger=PropertyChanged}" TickPlacement="None" TickFrequency="{Binding exposureTime.Increment}" VerticalAlignment="Center" Minimum ="{Binding exposureTime.Min}" IsSnapToTickEnabled="True" Margin="10"/>
</DockPanel>
During initializing the camera i get my nodemap node
exposureTime = CameraNodemap["Std::ExposureTime"] as FloatNode;
It get’s interesting after my nice debug event;
public MainWindow()
{
InitializeComponent();
initCam();
this.DataContext = this;
exposureTime.Updated += node_Updated;
}
the event node_updated no longer fires after the rediscover of the camera. Which makes me suspect that this entire problem lies somewhere in the nodes only being set once or something comparable?