Simply set the ContextMenu property to null as follows:
<TextBox ContextMenu='{x:Null}'>Testing</TextBox>
PermalinkCategory
Simply set the ContextMenu property to null as follows:
<TextBox ContextMenu='{x:Null}'>Testing</TextBox>
PermalinkYou can use the OpenFile Dialog to implement this functionality.
[C#]
using System.Text;
using System.IO;
private void button1_Click( object sender, EventArgs e )
{
OpenFileDialog dlg = new OpenFileDialog();
dlg.Title = 'Open text file' ;
dlg.InitialDirectory = @'c:\' ;
dlg.Filter = 'txt files (*.txt)|*.txt|All files (*.*)|*.*' ;
if ( dlg.ShowDialog() == DialogResult.OK )
{
StreamReader sr = File.OpenText( dlg.FileName );
string s = sr.ReadLine();
StringBuilder sb = new StringBuilder();
while ( s != null )
{
sb.Append(s);
s = sr.ReadLine();
}
sr.Close();
textBox1.Text = sb.ToString();
}
}
PermalinkUse the CharacterCasing property of the TextBox.
[C#]
textBox1.CharacterCasing = CharacterCasing.Upper;
textBox2.CharacterCasing = CharacterCasing.Lower;
PermalinkFax: +1 919.573.0306
US: +1 919.481.1974
UK: +44 20 7084 6215
Toll Free (USA):
1-888-9DOTNET