|
I am doing all of that, and it plain does not work. I also wrote code to load the images, and found that does not work either. I call a method in my dll, and if I put the dll name in the Uri, it returns an empty image. If I don't, it blows up. Talk about lousy design, someone at MS is smoking crack.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Well, really you can get the image from the foreign class library and show it in the WPF Image control with just one line of code. Look at the sample I've uploaded for you here.
Regards,
Oleg V. Polikarpotchkin
ovp
|
|
|
|
|
The simplest way I know:
<Image Source="/WPFTesterResourceLib;component/Images/Airplane.png" />
where Airplane.png is in a folder called Images in the WPFTesterResourceLib project and
has its Build Action set to Resource and the Custom Tool setting blank.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
first,see post http://bea.stollnitz.com/blog/?p=21 please.
in a factual application , this is very useful!
for describe clear ,add a new table into the database
the new table have tow field: Run_ID , Value1(type int). The Run_ID is the key of the table.
I want bind the new table to a datagrid in a silverlight application.
the datagrid have four columns:
1: Mountain_Name, represent as a combobox
2: Lift_Name, represent as a combobox
3: Run_Name, represent as a combobox
4: Value1, represent as a textbox
all columns is modify able.
the column 1 to 3 is Synchronized like as in the post http://bea.stollnitz.com/blog/?p=21
how I do this ?
and how set the column 1 to 3 when load the table into datagrid?
thaks very much!
|
|
|
|
|
hi guys
i have my dll , in which there are my domain objects , there are some classes
1- Employee
2- Student,
do i have to make all of them labeld with datacontract and datamemebr attributes if i want to
make available those classes to my WCf Client .
Thanks in advance ,
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
ghumman63 wrote: datacontract and datamemebr
The short answer is yes, if I understand your question. The DataContract describes how the object is serialized. The DataMember specifies that the member is part of the contract and is serializable.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
but still i can use them without these attributes ,
i have a reference to this library in my client and i can deserialize it easily so where is data contract and data member , i am confused ,
thanks in advance
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
ghumman63 wrote: where is data contract and data member
I guess I do not understand your question.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
i meean to say , i didnt use datacontract attribute but still i can
deserialize my objects at my client by just adding the reference of my domain DLL like
dim emp as employee = Servicereference.GetEmployee("staffno")//client code
in my wcf service class employee is not marked as datacontract , thats why i am confused that
in which case i need to mark it with datacontract attribute.
thanks in advance.
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
ghumman63 wrote: i need to mark it with datacontract attribute
As Pete said. You mark the class with a DataContract attribute when you are sending the object through WCF from host to client or from client to host. When the object is sent from one to the other, the object is serialized when sent, and deserialized when it gets to it's destination. The DataContract tells WFC how to serialize the object and how to deserialize it.
In your example, you are directly instatiating the class not deserializing it.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Individuality is fine, as long as we do it together - F. Burns
Help humanity, join the CodeProject grid computing team here
|
|
|
|
|
You can use them directly, but you need them if you want to marshall them "over the wire" using the internal WCF communications layers. Basically, these define parts of the Contract, which forms part of the basic tenet of WCF:
A = Address
B = Binding
C = Contract
Or, to put it another way; A = where the service is hosted; B = the mechanism you're going to use to communicate with it and C = the data and methods that you are going to interact with on the service.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
i meean to say , i didnt use datacontract attribute but still i can
deserialize my objects at my client by just adding the reference of my domain DLL like
dim emp as employee = Servicereference.GetEmployee("staffno")//client code
in my wcf service class employee is not marked as datacontract , thats why i am confused that
in which case i need to mark it with datacontract attribute.
thanks in advance. nkh
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
hi guys
i am very much new to WCF , actually the issue is that i have a seperate dll for my domain objects named "MYDomainObjects" , i add a reference into my wcf services and create a method which returns
object of type of Employee which is a class in ""MYDomainObjects",
on client i create a wpf client and add a reference to my ""MYDomainObjects""
and call the method and get values into my client side Employee object , but i am confued where
is now datacontract and data member , because it is said that we have to use data contract for our
complex types to be serialized ,, i hope you will understand my concern , thanks in advance ...
Tauseef A Khan
MCP Dotnet framework 2.0.
|
|
|
|
|
I used image-gallary download form codeplex.com on my project. It was very very slow to open a picture. I did same throught flash, it is much faster.
Can any body tell me how to speed up silverlight application to better than flash as it can get data of my asp.net and process it, flash is harder to work for such manner. I want to use silverlight because of easily support with c# and asp.net
|
|
|
|
|
There's no reason Silverlight should be significantly slower than Flash
opening a picture.
Without any details on what you're doing, it's difficult to help
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I have 10 pictures. I created thumbnails of all, now I have 20 pictures.
I used Data.xml file for path containing full-size and thumbnail pictures. Configuration.xml file for settings [These files I got automatically from codeplex.com Image Gallery Project].
I created Gallery, you can view at: http://www.trannumdigitalstudio.com/[^]
Also you cn view flash Gallery at: http://www.flashgallery.org/demo.html[^]. Here image size is bigger still faster
All images in Silverlight Gallery are at 72 dpi, 500*500 px resolution
|
|
|
|
|
I'm not sure what you are seeing.
The Silverlight gallery loads and shows images faster than the
flash one for me.
Once the images are cached (have been viewed) they load instantly.
Note I'm using Firefox 3.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
I don't know anything about silverlight but I am using firefox 3 and the silverlight page was really slow compared to the flash page.
I didn't get any requirements for the signature
|
|
|
|
|
|
I have a combobox where the ItemsSource is bound to a ObservableCollection<string> and the SelectedItem is bound to a string DependencyProperty.
The ObservableCollection<string> is populated so that the first string is an string.empty, so that something by default is not selected.
My problem is this, if I select something in the combobox beside the string.empty (by clicking the drop down arrow and left clicking on an item, you can click the drop down arrow and select the string.empty item. However you can use the scroll on the mouse and select the string.empty. Then the caveat is that you can not scroll with the mouse to something that is not string.empty, you have to hit the drop down arrow and select an item with a left mouse click.
Any ideas, this has me stumped.
|
|
|
|
|
babongita wrote: the SelectedItem is bound to a string DependencyProperty.
What does this binding look like?
I can't reproduce the problem if this binding is left out.
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
<ComboBox x:Name="cboDistrict"
IsSynchronizedWithCurrentItem="True"
Grid.Column="1"
Grid.Row="0"
Style="{DynamicResource BaseComboBox}"
TabIndex="20"
ItemsSource="{Binding Path=AllDistricts, Mode=Default}"
SelectedItem="{Binding Path=BodyTextDistrict, Mode=TwoWay}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding }"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
|
|
|
|
|
I took your scenario and binded by creating the dependency property, for me everything works. Once the mouse is over the combo box and combobox has the focus , scrolling works fine with the mouse. you can only post a sample so that actual issue can be observed
<ComboBox x:Name="cboDistrict" IsSynchronizedWithCurrentItem="True"
Grid.Column="1" Grid.Row="0" Style="{DynamicResource BaseComboBox}"
ItemsSource="{Binding Path=AllDistricts, Mode=Default}"
SelectedItem="{Binding Path=BodyTextDistrict, Mode=TwoWay}">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding }"/>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
Private Property AllDistricts() As ObservableCollection(Of String)
Get
Return DirectCast(GetValue(AllDistrictsProperty), ObservableCollection(Of String))
End Get
Set(ByVal value As ObservableCollection(Of String))
SetValue(AllDistrictsProperty, value)
End Set
End Property
Public Shared AllDistrictsProperty As DependencyProperty = _
DependencyProperty.Register("AllDistricts", GetType(ObservableCollection(Of String)), _
GetType(NameView), New UIPropertyMetadata(New ObservableCollection(Of String)))
Public Property BodyTextDistrict() As String
Get
Return Convert.ToString(GetValue(BodyTextDistrictProperty))
End Get
Set(ByVal value As String)
SetValue(BodyTextDistrictProperty, value)
End Set
End Property
Public Shared BodyTextDistrictProperty As DependencyProperty = _
DependencyProperty.Register("BodyTextDistrict", GetType(String), _
GetType(NameView), New UIPropertyMetadata(String.Empty))
|
|
|
|
|
I don't know what it means. It's XAMLParseException :
Cannot convert the value in attribute 'Style' to object of type 'System.Windows.Style'. Specified element is already the logical child of another element. Disconnect it first. Error at object 'buttonPushPin' in markup file 'CometWPF2;component/controlcrm.xaml' Line 42 Position 23.
Here's the offending code:
<ToggleButton Style="{DynamicResource UDPPushPinButton}" Name="buttonPushPin"
Width="26" Height="23" Margin="0,0,19,0" HorizontalAlignment="Right" VerticalAlignment="Top"
BorderThickness="0" Background="Transparent" BorderBrush="Transparent"
ToolTip="Pin this tab" />
More Info: This button is in all of the tabs in a tab control, and this error occurs when more than one tab (with the button) is added to the tab control. The tabs all contain a UserControl that has the button it.
"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 ----- "...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001
modified on Wednesday, April 15, 2009 9:17 AM
|
|
|
|
|
Set x:Shared="false" for this. This creates a unique instance instead of a static instance.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|