Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 5 years ago.
Improve this question
I try this but didn't work for me
private void listBoxControl2_SelectedValueChanged(object sender, EventArgs e)
{
listBoxControl5.SelectedIndex = listBoxControl2.SelectedIndex;
}
the question is sync movement of the selector on both listboxs for example if listbox1 was selected item 2 the other listbox should be on item 2 and if i move scroll on one of them the other should act same
Try doing it like this:
var itemIndex = listBoxControl2.SelectedIndex;
ListBoxControl5.SelectedItem =
ListBoxControl2.Items.IndexOf(itemIndex);
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
So I'm trying to make something and I know how to make topmost but how do I make it where from another tab like a settings tab make the main topmost but the check box is in a different tab then the one I want topmost?
here is the code I use for just being on the same tab.
if (!TopMost)
{
TopMost = true;
}
else
{
TopMost = false;
}
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I already set validation in all my output that works fine but I have a lot of view and a next button, I want that button to be disabled every time there is an error in the output, it's already set on IsValid and I did this in the code behind of the view:
private void abc_Click(object sender, RoutedEventArgs e)
{
if (Validation.GetHasError(CinInput) == true|| .......)
Console.WriteLine("+++++++++++++Nope+++++++++++++++++");
else
Console.WriteLine("+++++++++++++OK+++++++++++++++++");
}
I need a solution to bind the the result to my viewmodel so i can set isvalid to false any suggestion?
If you're using data binding then its possible to pass a command or command parameter to the viewmodel.
Looks like you're not following MVVM pattern from your abc_click.
You can access your viewmodel like this from your code behind :
var viewModel = DataContext as ViewModelClassName;
viewModel.SomeBooleanProperty = true; // Or false
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
how to bold text using rich text box and button? got error when doing this
private void italic_Click(object sender, EventArgs e)
{
richTextBox1.SelectionFont = new Font(richTextBox1.Font.FontFamily,Font.Size, Font.Bold);
}
Error :
Error 1 The best overloaded method match for
'System.Drawing.Font.Font(System.Drawing.FontFamily, float,
System.Drawing.GraphicsUnit)' has some invalid arguments
You need to change Font.Bold to FontStyle.Bold.
Change it like this
richTextBox1.SelectionFont = new Font(richTextBox1.Font.FontFamily, Font.Size, FontStyle.Bold);
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
How to incrase counter value when both textbox value are equal in onClick using C#, I am trying but after click the value is only one.
Are you referring to something like this?
int counter = 0;
//in event
if(textbox1.ToString().Equals(textbox2.ToString()))
{
counter++;
}
store the value in your UserControl or Window like int counter = 0;. Then in OnClick Event compare the values and set counter = counter + 1 which is the same as counter++
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Im using the Microsoft.Bcl.Async NuGet package. working on VS 2012 Pro.
The progress bar is not displayed even after making NewProgressBar Visible.
private async void Button_Click(object sender, RoutedEventArgs e)
{
NewProgressBar.Visibility = Visibility.Visible;
CloudResponse res = await WebService.Instance.MailMessage();
NewProgressBar.Visibility = Visibility.Collapsed;
if (res.success == 1)
MessageBox.Show("Message sent succesfully");
else if (!res.errorMessage.IsEmpty())
MessageBox.Show(res.errorMessage);
}
Make sure that the IsEnabled and IsIndeterminate properties of the progress bar are true.
Also u can take help from
http://social.msdn.microsoft.com/Forums/wpapps/en-US/b9755315-dd90-42f3-87be-0994415e8795/windows-phone-performance-progress-bar-not-getting-visible?forum=wpdevelop