How can i execute some command on, lets say, Ctrl+Shift+E? As i saw we can write the following:
KeyBinding kb = new KeyBinding(TestCommand, Key.E, ModifierKeys.Control);
this.InputBindings.Add(kb);
But how can i add more ModifierKeys or Keys?
...
In my application, I have a model object that contains a collection lets say List<Chair> that gets updated frequently. ViewModel has an ObservableCollection<ChairViewModel> that wraps List<Chair>.
Since List<Chair> gets updated frequently, I need to keep ObservableCollection<ChairViewModel> in sync with it so that every change in List<...
I am using Convert.ToInt32(ddlBuyer1Country.SelectedValue); to typecast a string returned by selectedvalue.
But this is giving me 0 instead of 3. I have selected value as 3 in this case.
...
In my program I call a method
xslTransform.Load(strXmlQueryTransformPath, xslSettings, new XmlUrlResolver());
The problem I am facing is: sometimes this function doesn't execute well within the time.
Sometimes compiler raises the time out issue after a long time of trial.. which inturn causes this part of application to shut. That i...
Hi All,
Was just wondering how I would go about letting the user resize a TextBox control at runtime by dragging its corners in WPF. Less importantly, is the same technique used for the resizing of all controls?
Thank you :)
...
I'm connecting the access 2007 database from 5 different machines. (C#.Net)
I'm having this error message:
The database has been placed in a state by user 'Admin' on machine XXXXX that prevents it from being opened or locked
...
I've got an XML document that I'm importing into an XmlReader that has some unicode formatting I need to preserve. I'm preserving the whitespace but it's dropping the encoded #x2028 which I assume should be expressed as a line break.
Here's my code:
var settings = new XmlReaderSettings
{
Prohi...
In a test that contains some asserts, for example:
Assert.AreEqual(1,1);
Assert.AreEqual(2,1);
Assert.AreEqual(2,2);
is it possible to let the test keep running after it fails at some point? In the example, first condition is true, second fails and the test stops. I'd like to evaluate also the following condition.
...
Is there a possbility to disable animation of the progress bar?
I need it for some pocess which is paused and not running at the moment. An average user would think the process is running if the progress bar is being blinking.
The advice to create own progress bar control is not what I'm looking for.
...
I'm trying to read the content of a file with a StreamReader, that receives a FileStream. The file has some spaces inside (char 32) and the StreamReader is reading them as 0 (char 48). The screenshot shows the FileStream buffer and the StreamReader buffer. Both have the value 32, but when I call Read(), it returns 48. Am I missing someth...
FastObjects.NET Saves the whole class object(if marked with attribute Persistent) at once in file system(using serilization or similar technology).
They are promissing that it is even faster then normal SQL DB approach. My team also thought it is better and faster to save the whole object once instead of each field one by one.
Definat...
I got an error when run datagridview.DataSource = dataView;
dataview is correct. I can see data inside it when I debug program.
I got next error "Object reference not set to an instance of an object."
Any Ideas?
code:
this.datagridview = new System.Windows.Forms.DataGridView();
...
DataSet ds = new DataSet();
XmlReaderSetting...
I am looking for a plug in to my application written in .net to enable me to display a work flow and see where in the work flow the process has got to.
I have seen this in K2 blackpearl, http://www.k2.com/en/blackpearl.aspx?tab=2, and I would like to graphically create this type of process
...
I have declared an MSBuild tag in my TFSBuild project in order to publish ClickOnce files for my project.
WSE 3.0 and .Net 3.0 are both pre-requisites for the application, so in Visual Studio I have ticked those as pre-requisites. When I build from Visual Studio, it creates a setup.exe file that I can publish to my web site. When you ...
Hello everyone, I am trying to make a find, find next function for my program, which I did manage to do with this code:
int findPos = 0;
private void button1_Click(object sender, EventArgs e)
{
try
{
string s = textBox1.Text;
richTextBox1.Focus();
findPos = richTextBox1.Find(s...
I added some textboxes to gridview using following code
<asp:TemplateField HeaderText="STD<br/>ID">
<ItemStyle BackColor="LightBlue" />
<ItemTemplate>
<div style="font-size:xx-small; overflow:hidden;">
<asp:TextBox ID="txtStandard" EnableViewState="true" Height="10" Font-Size="XX-Small" Width="50" Te...
I have a List that has various derived classes. I may have something like this:
List<BaseClass> list = new List<BaseClass>() {
new Class1(),
new Class2(1),
new Class3(),
new Class2(2),
new Class4()
};
I am trying to use LINQ to semi-sort the list so that the natural order is maintained EXCEPT for Class2. All Class2 instanc...
Hello all,
I'm seleting tool for populating my .net models (poco) with test data. I'm actually mocking wcf services and need to populate datacontract objects with test data. Found a huge number of test data generation tools, but the majority is realted to DB test data generation and don't fit well for .net objects creatiom.
The most a...
I don't want a war between VB.NET and C# developers, neither is my goal to open a C# VS VB.NET confrontation.
I would like you all to list a feature that is heavily used in C#, but is not available in VB.NET 2.0, and how would you work around to achieve a similar behaviour or purpose?
For example:
C#
Accepts void (return) lambda ...
Developing in .NET 3.5. Recently my well-worn link to the .NET Framework 3.5 Class Library documentation (http://msdn.microsoft.com/en-us/library/ms229335.aspx) started taking me to the .NET 4.0 docs. This is a bit of a nuisance, because I'm not interested in .NET 4.0 (yet)--the project I'm working on is in 3.5.
Previous versions of the...