|
Wow,. Fantastic response. Thank you!!!
If it's not broken, fix it until it is
|
|
|
|
|
The code used in populating combobox is as <DataGridTemplateColumn > <DataGridTemplateColumn.CellTemplate> <DataTemplate >
<ComboBox x:Name="dd" DisplayMemberPath="district" ItemsSource="{Binding Source={StaticResource districtViewSource}}" ></ComboBox> </DataTemplate> </DataGridTemplateColumn.CellTemplate>
</DataGridTemplateColumn>
THE PROBLEM IS THAT WHEN I SELECT A PARTICULAR ITEM IN COMBO EVERY COMBOBOX IN ABOVE COLUMN IE IN ALL ROWS AUTOMATICALLY SELECTS THAT ITEM. WHILE IT MUST BE ANOTHER ITEM FOR REMAINING ROWS.
|
|
|
|
|
All caps is the equivalent of shouting - very rude!
You are using the same collection districtViewSource for all the combos, create a copy of the collection and a selecteditem for each combo.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello All,
I have created a webpage and trying to integrate a Silverlight control with it. Unfortunately I am getting an error.
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="Home.aspx.cs" Inherits="OnlineEntertainment.Web.WebForm1" %>
<%@ Register Assembly = "System.Web.Silverlight" Namespace="Syste.Web.UI.SilverlightControls" TagPrefix="asp" %>
<%@ Register Assembly = "AjaxConrolToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Silverlight ID="Silverlight1"
Source="C:\Users\Hunter\Documents\Visual Studio 2010\Projects\OnlineEntertainment\OnlineEntertainment.Web\ClientBin"
runat="Server" Height="805px" Width="623px"> </asp:Silverlight>
</asp:Content>
Element 'Silverlight' is not a known element. This can occur if there is a compilation error in the Web site, or the web.config file is missing.
Is there any specific reason ? I have tried to search for the reference System.Web.Silvelrlight.DLL but it was not present.
I am using Silverlight 5 and Visual Studio 2010.
Thanks and Regards
Anurag
|
|
|
|
|
|
Hello Jason,
I understood your point and tried to modify the source path. However I am wandering that when I am trying to Register the System.Web.Silverlight why I am getting that warning and error. Element Silverlight is not a known element. Web.Config File Missing and all those stuffs.
What I have understood from the link you provided earlier is that there are two controls already shipped with Silverlight 2 SDK. i.e.
Meadia Control and Silverlight Control.
Since this Silverlight Control is not shipped by default with Silverlight 5 SDK I was thinking of that way out. Can you suggest about modifying the web.config file ?
My Modified Code
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.Master" AutoEventWireup="true" CodeBehind="Home.aspx.cs" Inherits="OnlineEntertainment.Web.WebForm1" %>
<%@ Register Assembly = "System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls" TagPrefix="asp" %>
<%@ Register Assembly = "AjaxConrolToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<asp:Silverlight ID="Silverlight1" Source="~/ClientBin/OnlineEntertainment.xap" runat="server" Height="805px" Width="623px">
</asp:Silverlight>
<br />
<hr />
<br />
</asp:Content>
Anurag Das
|
|
|
|
|
What's the preferred way to add an event -> ICommand mapping from within a style. I know I can do this use the i:interaction stuff *IF* I'm re-templating. In my case, I do not want to re-template. I just want to add an event handler through the style (because the base style must remain generic). There is no "root" UIElement to add to either. Specifically, I'm trying to handle an event thats coming from the TreeViewItem in my VM. I template the TreeViewItem in my UI Library, but I can't have app specific stuff in there. Don't want to copy the styles over because they are quite large and they really need to remain in the UI library so I don't have to maintain 2 copies.
I've seen some mention of attached behaviors, but it seems like you can only add a single attached command through a style??
|
|
|
|
|
whats the event that you want to handle?
is it selection event?
if it is, then you dont have to goto style for this
<TreeView ......>
<i:Interaction.Triggers>
<i:EventTrigger EventName="SelectedItemChanged">
<i:InvokeCommandAction CommandName="ItemSelected" Command="{Binding ItemSelectedCommand}" CommandParameter="{Binding SelectedItem, ElementName=default}"/>
</i:EventTrigger>
</i:Interaction.Triggers>
</TreeView>
|
|
|
|
|
We're using property grid object in the September release of the Extended Toolkit. We can't upgrade to the latest because they changed some stuff that will break our code. I don't remember exactly what it was, so don't bother asking.
In any case, we have a couple of properties in an object that have the ExpandableObject attribute set. We have an editor template defined that works fine until we try to use it with an ExpandableObject's property. In once instance (a color editor), the template doesn't visually appear at all. In the other (a number up/down), it doesn't appear to be obeying the Min/max values specified in the XAML. Again, BOTH of these templates work fine as long as the property isn't from an ExpandableObject.
Can anyone provide insight?
The docs for the toolkit quite frankly suck as much as documentation can suck, and info regarding the toolkit on the web is - to be kind - sparse.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass." - Dale Earnhardt, 1997
|
|
|
|
|
I see the same rendering behavior (With some black splashes when resizing) And when VS2012 not responding the real title-bar appears again over WPF's and not outside . Which is what WindowChrome does , Providing drawing on non-client areas .
But then i thought that it's impossible to make a drop-shadow effect outside of WinAPI's drawing area .. But seems that they actually success , Interesting .
SO , Did they used WindowChrome or something else ? I really want to know .
|
|
|
|
|
Hello,
I have a general question:
I'm building a WPF application.
I have a main window, in the window i have some constant header and footer and between them there is an area with changing content(work area).
During application lifetime different controls created inside the work area and the controls creates small windows.
I ran into a problem when i wanted to send an event from one of the windows to some control,the problem was that the window didn't have a reference to the control.
So i started to think maybe i did some bad design work and there is some way to create and manage my multiply controls and windows so the interaction between them will be easier.
Any one can help me with this one?
Thanks
|
|
|
|
|
What you basically need is a Mediator[^] that can act as a go between. Reading Sacha's article in the link I provided will be a good start.
Good Luck!
When I was a coder, we worked on algorithms. Today, we memorize APIs for countless libraries — those libraries have the algorithms - Eric Allman
|
|
|
|
|
Good Day
I have a project which was in .NET 4 , i used VS2010 on it. I later opened the Project in VS2012 and Build everything that build well in VS2010 , but it gives me some error relating to accessing the WCF functions. now in .NET 4 , we can create our service and reference it on the SIlverlight project like this
AuditSystem.DataLayer.DataAccessLayerClient business = new AuditSystem.DataLayer.DataAccessLayerClient();
business.GetAllUsersAsync();
business.GetAllUsersCompleted += new EventHandler<AuditSystem.DataLayer.GetAllUsersCompletedEventArgs>(business_GetAllUsersCompleted);
but now in VS2012 this does not look like its possible. After my upgrade to VS2012(4.5) my project does not build
Can one explain why ?
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
Good Day All
i got an Error , my proxy was not generated , i saw a warning that says "Custom tool warning: No endpoints compatible with Silverlight 5 were found. " and i did the Following
Delete the Service reference and did it from scratch and on the Service reference dialog uncheck the part that says
The 'reuse types in referenced assemblies' check-box
it was a cause of the problem.
Thanks
Vuyiswa Maseko,
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.com
vuyiswa[at]dotnetfunda.com
http://www.Dotnetfunda.com
|
|
|
|
|
I am asking this in the WPF forum because this is a WPF app but this question does not necessarily pertain to WPF, i.e. the UI thread.
Here is the scenario:
I have three (3) threads. Thread One (1) call it the Master Thread; Thread Two (2) is a Ethernet Comm thread; and Thread Three (3) is a GPIB comm thread. Both communication threads handle asynchronous communications from remote entities. At this time there is only one entity hanging off each comm type.
I have implemented a mix of EventWaitHandles and delegates. This all works pretty well. Just think this architecture is a bit ...... ugly. So which one is better/safer?
My concern is as follows. With delegates, for example, the Master thread registers an event handler with Thread 2 and an event handler with Thread 3 for messages that come in. Obviously data could come in near simultaneously. So Thread 2 encases a message in an EventArg and invokes the event on the Master thread. The Master Thread begins processing and then Thread 3 encases its message in an EventArg and invokes the event on the Master Thread. What happens? Does the Master Thread stop in the middle of handling the first event to service the second one? Does the second event wait until the first event is processed? What if Thread 2 gets another message and invokes the event again while the Master is processing the first event?
I wonder if using a queue and an manual Reset EventWaitHandle is not a better idea as the Thread 2 can check the status and wait until it is reset before putting the message in the queue and setting the EventWaitHandle again.
Opinions, please?
Thanks,
Doug
I am a Traveler
of both Time and Space
|
|
|
|
|
What version of Visual Studio are you using? Use the new async keyword. If you are using VS2010, you need to install the Async CTP. The async keyword produces *MUCH* cleaner code since all the syncronization / threading is hidden from the developer.
|
|
|
|
|
Good tip! Thanks i will look into this. I am using VS2010 so will need the add on.
Doug
I am a Traveler
of both Time and Space
|
|
|
|
|
Hi forum,
i know there are some articles for animated panels. But in all examples i've seen only that the items gets animated when the panel rearranges all items (because of resizing).
I am looking for some solution that also animates the items when the panel gets sorted. I've built some hack to get the container items animated when sorting. But it's far away from beeing a clean solution. It also looks like you can't use ItemsControl anymore, because if you use ItemsControl for sorting then all container items are recreated. This isn't good for performance and it's also not good when you use a fade-in Animation on items Loaded event.
Any suggestions? Thanks in advance!
regards,
tetrapack
|
|
|
|
|
|
how can we give a sql connectivity in silver light application during run time because my application style is
different from attached data base working as i already viewed few examples in our site
|
|
|
|
|
You can't connect your silverlight to a database, it does not support the System.Data namespace. You need to create a service interface between your SL app and the database, thats called WCF (or RIA services).
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thank u for your reply do you have any examples about WCF
|
|
|
|
|
There's bound to be one or two you can follow here[^].
|
|
|
|
|
You cant give direct Sql Connectity in the database.
Try using a WCF service to connect to the database.
|
|
|
|
|
The question is in the title. I just need to relieve myself of the gnawing worries, that is, until someone answers "No".
|
|
|
|