Is there any way to broadcast a RoutedEvent to all of my children in WPF?
For example lets say I have a Window that has 4 children. 2 of them know about the RoutedEvent 'DisplayYourself' and are listening for it. How can I raise this event from the window and have it sent to all children?
I looked at RoutingStrategy and Bubble is the ...
In .NET 3.5, I'd like to create a singleton interface:
interface ISingleton <T>
{
public static T Instance {get;}
}
Of course that doesn't work but is what I'd like. Any suggestions?
EDIT: I just want it to be known that all singeltons will have a static property named Instance of the class type. It is always there. An interface w...
G'day everyone.
I'm still learning LINQ so forgive me if this is naive. When you're dealing with SQL directly, you can generate update commands with conditionals, without running a select statement.
When I work with linq I seem to follow the pattern of:
Select entities
Modify entities
Submit changes
What I want to do is a direct u...
Ok, so I have an object named "Business" (I know, I know, "Business Business Object")
When it saved its foreign keys are getting lost somehow. Everything else is saving. I have stepped through the code and followed the object up until the
session.SaveOrUpdate(businessObject);
method. The object at that point is intact and the foreign ...
My main window has spawned a child window that's positioned on top to look like part of the main. I would like to move the child window in sync with the main but I'm not sure how.
My main window has my own title bar which event MouseLeftButtonDown calls this function:
public void DragWindow(object sender, MouseButtonEventArgs args)
{...
I'm trying to come up with a simple, easy to use design pattern for error handling in a .net wcf service (specifically a silverlight enabled wcf service). If an exception gets thrown in the service method the silverlight application will see a CommunicationException stating "The remote server returned an error: NotFound ---> " and possib...
I am looking for a comparison of Fingerprint reader SDKs available for .NET (we are using .Net 3.5). My requirements are
1. Associate more than one fingerprint with a person.
2. Store the fingerprints it self. (So I do not have to change the Database for my program.)
3. Work in both event and no-event mode. (Event Mode: Give notifi...
In my database, I have a few columns in one of my tables that are bit (boolean) values. They are allowed to be NULL since the fields are not always going to contain data.
I've gone through the process of creating an XSD DataSet using the table and made sure that the AllowDBNull field is set to True.
However, when I pull a down record f...
The application that I'm building requires the .NET framework. Unfortunately our end users will not have admin privileges. I know it isn't possible to install .NET without admin privileges, but is it possible to build a pre-packaged version of it into our system so the user doesn't need admin privileges? If it is possible, how would I...
Is there an attribute I can use on a method so that when stepping through some code in Debug mode the Debugger stays on the outside of the method?
...
I realize that a whole lot of code cannot fit here, but I am asking for general direction or pointer.
I have .NET user controls nested six deep for an interactive gadget with (outer to inner) of : wrapper, tabs, panels, lists, rows, items.
I am trying to get a reference to an ancestor control from a nested control.
Specifically, I ...
Hi,
I have two versions of an almost identical database. Below I have created an Example table to demonstrate the basic differences, namely the ID column has changed from an Integer Identity to a GUID and various properties have been updated, in the Example archived has been replaced with readOnly and hidden:
Legacy version:
CREATE T...
What languages or platforms influenced the .NET 1.0 Team to build-in the concept of Attributes from the very start? Was this an Aspect-Oriented thing? Serialization? or something else? I was still in VB6-land at this time, and never used any of the pre-1.0 .NET versions.
...
Hi,
I’m developing a .NET application with an auto refresh feature. Every table in my database has a MODIFIED_DATE column that gets updated after each update or insert. At the moment the auto refresh feature will apply to only one table, however it may change in the future. I’m currently considering the following possible solutions:
C...
The following throws an InvalidCastException.
IEnumerable<int> list = new List<int>() { 1 };
IEnumerable<long> castedList = list.Cast<long>();
Console.WriteLine(castedList.First());
Why?
I'm using Visual Studio 2008 SP1.
...
Does anyone know of any issues with VS 2003/2005 and 2008 co-existing on the same install.
The registry hives are all separated and the .net frameworks all have their own locations. Only issue I can think of is the Web support (which can either be 1.1 or 2.0 but not both)
Am I missing anything? Am I going to run into trouble?
EDIT
...
Hi, I am interested to lock a ToolBarButton in .NET 1.1 so that property .Enabled = True is ignored. I have looked at the members of it and cannot find anything useful.
I have found Property Change Notification in my research and it seems to be available only in .NET 3.0. Have you implemented something similar before? Is there any worka...
First, I'm not here to start some debate over which is better or more popular, etc. I have a simple question that I'm sure has many answers and I'm willing to listen to them all. Here's my basic background: self taught HTML, high school class in C++, self taught PHP, self taught MySQL/db programing/websites, self taught CSS, college clas...
I have the following requirement
I have a Employee class:
public class Employee
{
public int ID{get; set;}
public string EmpFName{get; set;}
public string EmpLName { get; set; }
}
I want to do something like this when creating values
var Emp = new List<Employee>[]{
new Employee{id=1, EmpFname="matt", Emp...
I have 2 related database tables which in simplified form look like this
Product(
product_id,
name
)
ProductSpecs(
spec_id,
product_id,
name,
value
)
Foreign key is set via product_id field and ProductSpecs table has a unique constraint on (product_id, name) pair.
Now in my ASP.NET MVC application when user edits product...