Getting into the first serious WPF project. It seems like there are a lot of basic controls flat out missing. Specifically, I am looking for the Numeric UpDown control. W
Use VerticalScrollBar with the TextBlock control in WPF. In your code behind, add the following code:
In the constructor, define an event handler for the scrollbar:
scrollBar1.ValueChanged += new RoutedPropertyChangedEventHandler(scrollBar1_ValueChanged);
scrollBar1.Minimum = 0;
scrollBar1.Maximum = 1;
scrollBar1.SmallChange = 0.1;
Then in the event handler, add:
void scrollBar1_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
{
FteHolderText.Text = scrollBar1.Value.ToString();
}
Here is the original snippet from my code... make necessary changes.. :)
public NewProjectPlan()
{
InitializeComponent();
this.Loaded += new RoutedEventHandler(NewProjectPlan_Loaded);
scrollBar1.ValueChanged += new RoutedPropertyChangedEventHandler(scrollBar1_ValueChanged);
scrollBar1.Minimum = 0;
scrollBar1.Maximum = 1;
scrollBar1.SmallChange = 0.1;
// etc...
}
void scrollBar1_ValueChanged(object sender, RoutedPropertyChangedEventArgs e)
{
FteHolderText.Text = scrollBar1.Value.ToString();
}