Silverlight / WPF

1) If you are deploying your service on IIS, you will need to redeploy after adding the new method.
2) You will need to update your service proxy. If you added the website manually, then just right click on the service and refresh.

How to achieve the below layout ? I am new to Silverlight. I need to achieve the same with Paging. Which one is better DataGrid or ListBox ? Can i achieve the same with normal Silverlight but with paging? I dn't want a column header and also my row should have the details filled with Image,Links,Text etc as below...

I want to achieve the same Layout as given in the link http://demos.devexpress.com/AgDataGridDemos/ under the Customization/Row Template tab with Filtering,Sorting and paging functionalities using normal Silverlight Controls. I have to hide the Headers also.

Note: In the example,u can see only Rowtemplate.I wanna acheive exactly same Layout.Go to Link and Click Customization/Row Template tab

Since you use a number of features like filtering and sorting, you could go for a grid rather than a listbox.
If you want to go for light code and avoid a heavy grid loading on your page, you could still consider using the listbox and build sorting and filtering features into it.

I have a SL application that I have been working. Make little changes and save a back up so I can roll it back if a problem so I have a few backups.
Today I open the project and the page generated an error. Although I can compiled successfully, the error is when I view page in designer. “ ArgumentException was thown on parameter”: The myMethod method does not have an argument that matches the querParameter collection”.
Then I tried to load a previous project and shows the same thing, as of matter of fact, all of them have the same problem now. What a…!!!
Problem points to
<riaControls:ParameterParameterName="argType"Value="{Binding ElementName=argTypeTextBox, Path=Text}"/>
The code is below. Any help is greatly appreciated
<navigation:Pagex:Class="EclipseMTX.Views.Protons"xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"xmlns:d="http://schemas.microsoft.com/expression/blend/2008"xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"mc:Ignorable="d"xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation"d:DesignWidth="1200"d:DesignHeight="724"Title="Protons Page"BorderBrush="#FF834F4F"xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"xmlns:riaControls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.DomainServices"xmlns:my="clr-namespace:EclipseMTX.Web"><Gridx:Name="LayoutRoot"Background="#FF0E0E0E"Width="1196"Height="728"><sdk:DataGridAutoGenerateColumns="True"AutoGeneratingColumn="DGPro_AutoGeneratingColumn"Height="263"HorizontalAlignment="Left"Margin="135,86,0,0"Name="dataGrid1"VerticalAlignment="Top"Width="1049"Background="#F3333333"Foreground="WhiteSmoke"RowBackground="#F3333335"VerticalScrollBarVisibility="Disabled"/><sdk:LabelHeight="45"HorizontalAlignment="Left"Margin="439,28,0,0"Name="label1"VerticalAlignment="Top"Width="324"Content="Proton Installed base"Foreground="WhiteSmoke"FontSize="28"/><sdk:DataPagerHeight="26"HorizontalAlignment="Left"Margin="135,347,0,0"Name="dataPager1"PageSize="10"VerticalAlignment="Top"Width="1051"Background="#F3333333"Cursor="Hand"Foreground="WhiteSmoke"/><ButtonContent="Run Query"Height="23"HorizontalAlignment="Left"Margin="19,355,0,0"Name="button1"VerticalAlignment="Top"Width="102"Click="button1_Click"/><riaControls:DomainDataSourceAutoLoad="False"d:DesignData="{d:DesignInstance my:Proton, CreateList=true}"Height="0"LoadedData="protonDomainDataSource_LoadedData"Name="protonDomainDataSource"QueryName="GetProtonsFiltered"Width="0"><riaControls:DomainDataSource.DomainContext><my:EclipseMTXDomainContext/></riaControls:DomainDataSource.DomainContext><riaControls:DomainDataSource.QueryParameters><riaControls:ParameterParameterName="argType"Value="{Binding ElementName=argTypeTextBox, Path=Text}"/></riaControls:DomainDataSource.QueryParameters></riaControls:DomainDataSource><StackPanelHeight="30"HorizontalAlignment="Left"Orientation="Horizontal"VerticalAlignment="Top"></StackPanel><sdk:LabelHeight="28"HorizontalAlignment="Left"Margin="19,58,0,0"Name="label3"VerticalAlignment="Top"Width="120"Content="By Vendor"Foreground="WhiteSmoke"FontSize="18"/><sdk:DataGridAutoGenerateColumns="True"AutoGeneratingColumn="DGPCSN_AutoGeneratingColumn"Height="265"HorizontalAlignment="Left"Margin="135,421,0,0"Name="dataGrid2"VerticalAlignment="Top"Width="1049"Background="#F3333333"RowBackground="#F3333335"Foreground="WhiteSmoke"/><ButtonContent="Run Query"Height="23"HorizontalAlignment="Right"Margin="0,509,1084,0"Name="button2"VerticalAlignment="Top"Width="93"Click="button2_Click"/><ComboBoxHeight="23"HorizontalAlignment="Right"Margin="0,453,1068,0"Name="comboBox2"VerticalAlignment="Top"Width="120"SelectionChanged="comboBox2_SelectionChanged"/><sdk:DataPagerHeight="26"HorizontalAlignment="Left"Margin="135,687,0,0"Name="dataPager2"PageSize="10"VerticalAlignment="Top"Width="1047"Background="#F3333333"Foreground="WhiteSmoke"/><RadioButtonContent="By PcSn"Height="33"HorizontalAlignment="Right"Margin="0,389,1075,0"Name="radioButton1"VerticalAlignment="Top"Foreground="WhiteSmoke"FontSize="18"Width="109"/><RadioButtonContent="By T-Box"Height="33"HorizontalAlignment="Left"Margin="8,421,0,0"Name="radioButton2"VerticalAlignment="Top"Foreground="WhiteSmoke"FontSize="18"Width="131"/><TextBoxBackground="#FF0E0E0E"Height="34"HorizontalAlignment="Left"Margin="668,387,0,0"Name="textBox1"VerticalAlignment="Top"Foreground="WhiteSmoke"FontSize="12"Width="428"BorderBrush="Black"/><ListBoxHorizontalAlignment="Left"Margin="12,86,0,0"Name="listBox1"Width="120"Background="#F3333333"Foreground="WhiteSmoke"Height="263"VerticalAlignment="Top"/></Grid></navigation:Page>

I am using WPF, C#, Linq to Sql -- I have a stored procedure and I am trying to bind the results to a treeview two levels deep. Below is some of the code I thought might help understand better, I am not sure if I needed to post this much code, but I can remove the uneeded code. I am having trouble figuring out the bindings with the data-templates. Any suggestions or comments would be appreciated.

Trying to use VisualTreeHelper.HitTest on a TreeView. I have two arbitrary items. TreeViewItem1 and TreeViewItem2. These items may appear anywhere on the tree and have any sort of relationship (different parents, etc.). I've gotten the top left point of the two items. pt1 and pt2. I want to find the visible TreeViewItems in between. So I did:

I would like to move to a MVVM approach and have created a viewmodel to retrieve the data and pass it into a view by creating an instance of my viewmodel and setting the datacontext property of my listbox. The viewmodel works fine when I am just creating some mock data and populating a list. However, due to the asynchronous nature of using a loadoperation with silverlight, the above code doesn't work with the MVVM approach for me. The data is retrieved but it appears that it is after my view has already loaded so it never appears. Below is my code:

Why do you have _employees and _myEmployees? The main issue is that _myEmployees = employees doesn't trigger a change notification, so you'd have to call OnPropertyChanged("myEmployees") after the assignment. That is the correct method, but then employees should be a local object, not a class member.

I could not find no example on how to write a wpf control that wraps c++ win32 window. If some one could provide me with a link to a newbie-like tutorial/documentation (sample code would be good too) on how to create c# libraries that wrap c++ code I would be very thankful.
Thanks in advance.

Hi!
Thx for the link. I found that one my self and I tried to modify the sample code to my needs but i failed.

I'll try to explain more what I'm trying to do.

So I have 3rd party OpenGL application written in C++ that is capable to show its output on another process window by passing a HWND pointer of that window (re-parenting).

If I create basic C++ Win32 aplication and pass its window HWND to that 3rd application I see output of that application in my application window.

Since I don't know C++ programming that well and I'm a little better at C#, I would like to create a WPF control that wraps C++ window in a dll that I can use in my WPF project.

Now the problem is that I can't figure out how to override WM_PAINT function so that WPF would be able to render that control correctly.
Because now I get that control instantiated and I get the HWND of that control (which is different of the WPF window hosting it) but when I pass it to that 3rd party application nothing happens.

My guess is that WM_PAINT is being called correctly but WPF window is not rendering that control because it knows nothing of WM_PAINT ?!

Now, the MSDN resource is a bit difficult for me to figure out how to solve my problem. Mostly because I need some easy reading on how to write managed c++/clr code.

Any suggestion on some websites or books that explain this subject (on elementary school level ) ?
Thx again!

So I have PInvoked BeginPaint() and EndPaint() funcrions also.
And I'm able to draw inside my win32 window from there.
But my 3rd party application still can't and I don't know what else do I need to override to make it work.
At this point there is no difference between win32 window hosted in WPF application and win32 window created by c++ win32 application or is there ?!
Maybe type of class inside CreateWindowEx function ("static") should be something different, or some of window parameters should be changed.

My guess is that WPF is preventing win32 window from communicating with 3rd party process. Response from 3rd party app is: "visual not possible"

Here is link to my project if anyone interested to look what I did so far.

Don't know if there is a way to simulate my situation by trying to redirect (reparent) some other application (that uses win32) window output to my app. I'm not in position to share that 3rd party application that I'm using.

The 3rd party vendor don't consider this to be a valid customer API request as this is something they use internally (they have couple of apps that can do this and they have some interop wpf dll's for this but it is not exposed for others)

Hmmm... maybe its not possible then. If you can do it in C++, then you should be able to take that C++ window and host it on a WPF form. My only other suggestion would be to maybe package it as an ActiveX control and then host that on the WPF form natively. Not sure if it will work though...

I just noticed it now in your previous response, but you said they have interop WPF dlls that are working? Why don't you just use those? Are those written in C# or C++? If they are written in C#, you can view the exact code by using ILSpy, .NET Reflector, etc. If they are written in C++, you can view the DLL exports easily using the dumpbin utility that comes with Visual Studio.

Hi,
You're rather trying to do something that will break WPF!
WPF is rendered using DirectX. The whole thing, there is just a window wrapper for win32 environment. You cannot do anything by passing it an WM_PAINT message.

Here comes the fix. Set up a winforms host inside your app xaml. Put a label control (winforms equivalent of STATIC) inside the host . Set the text to empty. get it's HWND by getting its Handle property and pass it to your native library that does OpenGL stuff through P/Invoke.

Here is a MSDN Walkthrough to guide you. Just replace that MaskedTextBox code with a Label.

I just moved to a new company. And they use this seemingly cool ORM: IdeaBlade, will let the developer do Linq2SQL on the client (Silverlight) side.
There are performance issue though...
Haven't work with real data yet (it's big) but just the ORM seems to have some down time (due to initialization and query parsing)
I wonder did anyone here used IdeaBlade (DevForce)? is it good?
How does it compare to WCFDataService?

I am facing an issue i.e., i created a login form and main window (after login, if login sucessfull). I implemented the application in mvvm pattern. I don't know how to call the main window after sucessful login using mvvm. Can anybody help me out from here.

Each item would be a non-movable panel with its own controls. Each child will have connected with a line (Also selectable). On top of it, some childs are going to have multiple parrents. The closest that i have seen to compare is code map in VS2012 Update 2.

Example: Panel 1 and 2 are parents of panel 3

Panel1 Panel2
| |
---------
|
Panel3

I would like some pointers where to go, or if there is a custom control as long as it is free and can redistribute with or without source code. When i finish my personal project i will release source. As i am hobbiest programmer, my understanding on WPF is limited, so thank you for your time and patience.

Thanks for suggestion, but i didn't knew what to search. I am currently reading a WPF book and in a book i saw word diagram in it. At that moment i found WPF Diagram Designer article that is perfect. Since my native language is not english i could not remeber word, that would help me search on google

Not quite sure an "e.Handled = true" concept in messenger makes sense since the messages are going to be propogated in a random/arbitrary/indeterminate order. Its really up to the subscriber to determine if the message should be handled. Your "e.Handled = true" concept might just mean that somebody handled it and its up to the subcriber to play nice and check the flag. A lot of messenger implementations fire & forget the notifications in async mode too. Then it makes even less sense.