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
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 1 year ago.
Improve this question
I am quite new to this and I am building an easy app in visual studio in C# which is plotting graphs and user can customize them by using checkboxes and radiobuttons. These are linked to events and when checkstate is changed, the event is called and the code do its job. But these events are called even when the checkstate was not changed and all plotted areas reload multiple times which is not very pleasant to the user. Can you please advise me how to call the event only when it is required. It's WinForms. An example is below. I want to display the output in both cases - if the bool value is true or false, the output is dependent on this and the outcome is different.
`
private void CheckBoxCountInvalid_CheckStateChanged(object sender, EventArgs e)
{
if (checkBoxCountInvalid.Checked)
countInvalid = true;
else
countInvalid = false;
ShowOutput();
}
`
An (if else) sounds like if would work fine for that problem.
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 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);
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);