|
when i try to run my silver light 3 application i m getting the following message
"The Silverlight managed debugging package isn't installed"
pls help me to get out of this mess
|
|
|
|
|
Have you installed the Silverlight Tools for
Visual Studio?
Silverlight: Get Started[^]
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
No you need the Developer runtime
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@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
i have same error ,i installed MS silverlight,MS Silverlight SDK 3 ,MS Silverlight tools for VS 2008......
any help
|
|
|
|
|
Hello.
What is the XAML code of a WPF's TreeView Separator ?
I've been using <Separator /> , But this one is selectable ! I'm looking for a non-selectable Separator Tag !
Could you please guide me ?
Thanks in advance.
|
|
|
|
|
You can add a IsSeparatorBefore property to your view model objects, and have your DataTemplate draw the separator above the item if the property is true. You can use a negative top margin to have it appear above the selection.
Alternatively you can implement an attached property called IsSelectable that you can attach to your separator element. In the behavior of the property catch the PreviewMouseDown event and mark it as handled.
Also you can try to set IsEnabled to false on the separator, not sure that property is available on it.
|
|
|
|
|
Aviad P. wrote: You can add a IsSeparatorBefore property to your view model objects, and have your DataTemplate draw the separator above the item if the property is true. You can use a negative top margin to have it appear above the selection.
Unfortunately I couldn't understand the concept of view model objects.
Aviad P. wrote: Also you can try to set IsEnabled to false on the separator, not sure that property is available on it.
I tried it, when I set IsEnabled property to false , it's selectable again.
|
|
|
|
|
|
I have a dialog in using C#.
I need to put a button using WPF, XAML.
How can i do this working?
|
|
|
|
|
Hi
I am working on a project in which Computer interact with some Microcontroller
Computer sends some commands in a particular protocol, and receive some data in turn
There is a problem:
we have lots of Microcontroller connected to a computer via serial port,
because serial port is another thread, we send command from computer
but we don't know when exactly we receive the response of MicroController
as we have lots of MicroController connected to computer, we can not have lots of delay for each command sending
so I used a Interrupt based (Event Oriented) code, but
you suppose I send a command to a MicroControler , but don't wait for response
and send another command to another MicroController, ...
at the other hand , we are receiving some data,
that they are the responses
the problem is here: we can not distinguish which response belong to with MicroContoller
is there a solution for this problem?
is it a multiThreading problem?
|
|
|
|
|
its not clear from what you've said what the relationshop between serial port and microcontroller is - without that, questions like 'is there a solution for this problem' && 'is it a multihreading problem' are real hard to answer - and to throw multithreading into the mix may make you're life harder !!
So, if one serial port has multiple microcontrollers attached to it, Im guessing there must be a way of adressing each microcontroller on the serial port. As you say,
cppwxwidgetsss wrote: we can not distinguish which response belong to with MicroContoller
which I find hard to visualise, so the only way I see of handling this is to have 1 to 1 relationship between serial-ports and microcontrollers, unless the response from a microcontroller can be improved to say which one its coming from ..
It must be a fairly common issue, so Im wondering if there's a serial I/O board you can use between the serial interface of the pc and the microcontrollers, that you'll know which microcontroller to address and get a unique response back from it
sorry I cant help more
'g'
|
|
|
|
|
actually we have a bus-like serial port which means that we use the serial port in share with lots of microController
and as the protocol is implemented before, we have not any mean to find out which device is sending a message (it is not expected before in protocol)
so that I think this is a multithreading problem
if someone have useful info help me please
|
|
|
|
|
Hi,
I think I understand your problem I take it you are using interrupts with your serial comms as in my article:Serial Communication using WPF, RS232 and PIC Communication[^] . I'm an electrical engineer so I do a lot of work with micro-controllers and programming on UI levels.
From my understanding at the moment the you can not determine which micro-controller has sent the data of which the interrupt loads and displays. There are a few solutions to you problem which depend on your ability to reprogram the micro-controllers.
1st I will assume this is not an option:
If you can ensure that the micro-controllers respond one after each other the you could try the older approach of creating another thread and reading all the data into a buffer this more common in C# applications. I can provide an example of this if required however it's not used that often any more. This will attempt to read the data in a let you deal with it a bit at a time however is less efficient than interrupts and your likely to to loose data.
The best option to ensure data integrity is simply to wait after polling each micro-controller until data is received however I understand this may not be possible if at time the micro-controller does not respond with data. If this is true you will have to introduce a timer to continue after if no data is received.
2nd If you can reprogram the micro-controllers:
This is far easier, 1st simply ensure each micro-controller sends and ID tag before sending any data this way you can determine the start of each package and the device.
An alternative which is the bus standard norm is a busy line. It requires an extra connection between your micro-controllers when a controller receives a request for data it will set this line high. Before any other micro-controller can send it's data it must wait for this line to go low. This method again relies on data always being sent on request and has inherent problems such as if one micro-controller takes a considerable time to transmit for example it has a long string of data to send you could find yourself polling for data from micro-controllers before they have had time to send there previous data. This timing issues are important to deal with and I would recommend the first option for ease as you could still end up with the same problem.
I hope this helps however I do have question if you haven't designed the micro-controllers yourself. If you have your micro-controllers configure on one comms line i.e. one TX and RX line in a bus configuration a busy line should have already been employed else there is nothing to stop your micro-controllers sending data over the top of each other. I would unfortunately expect that this is true in which you could still have the problem you described. Your easiest solution would be to wait to receive data from a micro controller before requesting more. This can still be done extremely fast.
Feel free to ask further questions
Cheers
Chris
|
|
|
|
|
I am collecting the data through serial port and storing it continuously in MYSQL DataBase.
I need to get the data from it and draw the real time graph on WPF applicaiton.
Kindly help me out as i am very new to it.Kindly help me with any samples or examples.
|
|
|
|
|
Hi everybody.
I've created a TreeViewItem in WPF via C# :
TreeView1.Items.Clear();
Image imageHistory = new Image();
imageHistory.Source = new BitmapImage(new Uri(@"/passwordManager;component/images/TreeView/history.png", UriKind.Relative));
imageHistory.Width = imageHistory.Height = 16;
Label labelHistory = new Label();
labelHistory.Content = "History";
StackPanel stackPanelHistory = new StackPanel();
stackPanelHistory.Orientation = Orientation.Horizontal;
stackPanelHistory.Children.Add(imageHistory);
stackPanelHistory.Children.Add(labelHistory);
TreeViewItem treeViewHistory = new TreeViewItem();
treeViewHistory.Name = "TreeViewItemHistory";
treeViewHistory.Header = stackPanelHistory;
TreeView1.Items.Add(treeViewHistory);
The result of above codes :
<TreeView x:Name="TreeView1" FontSize="13" Grid.Column="0" BorderBrush="Transparent" Padding="0">
<TreeViewItem Name="TreeViewItemHistory">
<TreeViewItem.Header>
<StackPanel Orientation="Horizontal">
<Image Source="images/TreeView/history.png" Width="16" Height="16"></Image>
<Label Content="History"/>
</StackPanel>
</TreeViewItem.Header>
</TreeViewItem>
</TreeView>
After that, I'm gonna add some TreeViewItems within TreeViewItemHistory ,
For doing it , I've written the following C# codes :
private void MenuItem_Click(object sender, System.Windows.RoutedEventArgs e)
{
for (int i = 0; i < 10; i++)
{
Image img1 = new Image();
img1.Source = new BitmapImage(new Uri(@"/passwordManager;component/images/TreeView/empty-bookmark.png", UriKind.Relative));
img1.Width = img1.Height = 16;
Label label = new Label();
label.Content = "Test " + i;
StackPanel sp = new StackPanel();
sp.Orientation = Orientation.Horizontal;
sp.Children.Add(img1);
sp.Children.Add(label);
TreeViewItem treeViewItem = new TreeViewItem();
treeViewItem.Name = "TreeViewItem" + i;
treeViewItem.Header = sp;
TreeViewItemHistory.Items.Add(treeViewItem);
}
}
The above method runs without any Exceptions , but nothing happen and no TreeViewItem doesn't add to TreeViewItemHistory .
I don't know what wrong is with it!
Could you please guide me ?
Editing : I added the XAML code of TreeViewItemHistory within TreeView1 at first. Then, in a method I have cleared all TreeView's TreeVewItems with TreeView1.Items.Clear(); . finally I've added TreeViewItemHistory via C# again.
Thanks.
|
|
|
|
|
The Items property doesn't hold TreeViewItem objects, it holds your business (or viewmodel) objects, and a TreeViewItem object is generated behind the scenes for each of them.
Your way of handling the TreeView is not how things are meant to be done in WPF... You should read more about DataTemplate ItemTemplate etc...
|
|
|
|
|
|
Try reading this[^] article instead.
"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
|
|
|
|
|
You can take advantage of the new Silverlight 4 training course on Channel 9 Learning Center [^] where you will learn about the latest features of the Silverlight 4 Beta, announced at the Professional Developers Conference 2009.
Some of the new and highly anticipated features include Printing, Webcam and Microphone support, custom right-click, rich text, HTML support and access to local files with trusted applications.
The course contains a video and a technical feature overview that allows you to drill down into lessons that address three topics: Enabling Business Application Development, Empowering Richer Experiences and Moving Beyond the Browser.
Each lesson includes detailed guidance and code samples.
|
|
|
|
|
Nice - thanks .
There's nothing left in my right brain and nothing right in my left brain. |
|
|
|
|
|
Hi, I created WPF as C# dll.
And i loaded that dll in one of my VC++ dailog.
Now the control apperas in dialog from the half and other place look fully black.Whats my mistake.How can i do that.
Pls help me.
Anu
|
|
|
|
|
This is my service code
<br />
using System;<br />
using System.Collections.Generic;<br />
using System.Linq;<br />
using System.Threading;<br />
using System.ServiceModel;<br />
using System.ServiceModel.Description;<br />
using System.Collections;<br />
<br />
namespace ServerConsole<br />
<br />
{<br />
<br />
[ServiceContract ]<br />
<br />
public interface IService1<br />
{<br />
<br />
[OperationContract]<br />
String GetMessage(String name);<br />
<br />
[OperationContract]<br />
string GetData(int value);<br />
<br />
<br />
<br />
}<br />
<br />
[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)]<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
public class Service1 : IService1<br />
<br />
{<br />
<br />
<br />
Int32 someNumber;<br />
<br />
<br />
<br />
Service1()<br />
<br />
{<br />
<br />
Console.WriteLine("{0} : Created new instance ", System.DateTime.Now);<br />
<br />
}<br />
<br />
<br />
<br />
public string GetData(int value)<br />
<br />
{<br />
<br />
<br />
<br />
<br />
<br />
someNumber = value;<br />
<br />
<br />
<br />
<br />
Random rand = new Random();<br />
<br />
<br />
<br />
Thread.Sleep(rand.Next(1000));<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
Console.WriteLine("parameter = {0}, somenumber = {1}, thread = {2}\n",<br />
<br />
<br />
<br />
value.ToString(),<br />
<br />
<br />
<br />
someNumber.ToString(),<br />
<br />
<br />
<br />
Thread.CurrentThread.ManagedThreadId);<br />
<br />
<br />
return string.Format("You entered: {0}", value);<br />
<br />
<br />
<br />
}<br />
<br />
<br />
public String GetMessage(String name)<br />
<br />
{<br />
<br />
Console.WriteLine("{0} : Get Message called on thread {1}", System.DateTime.Now, Thread.CurrentThread.ManagedThreadId);<br />
<br />
return "Hello world from " + name + "!";<br />
<br />
}<br />
<br />
}<br />
<br />
<br />
class Program<br />
<br />
{<br />
<br />
static void Main(string[] args)<br />
<br />
{<br />
<br />
ServiceHost serviceHost = new ServiceHost(typeof(Service1), new Uri("http://localhost:8001/ServerConsole"));<br />
<br />
serviceHost.AddServiceEndpoint(typeof(IService1), new WSHttpBinding(), "");<br />
<br />
<br />
<br />
ServiceMetadataBehavior smb = new ServiceMetadataBehavior();<br />
<br />
smb.HttpGetEnabled = true;<br />
<br />
serviceHost.Description.Behaviors.Add(smb);<br />
<br />
<br />
<br />
serviceHost.Open();<br />
<br />
<br />
<br />
<br />
<br />
Console.ReadKey();<br />
<br />
<br />
<br />
serviceHost.Close();<br />
<br />
}<br />
<br />
}<br />
<br />
}<br />
<br />
<br />
but through this code i cannot understand properly the concurrency mode,<br />
<br />
do any one have code to under stand concurrency mode clearly.<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
|
|
|
|
|
Single: Requests are queued, so only one can be processed at a time. No threading issues.
Multiple: Multiple requests can happen at the same time. You have to deal with it just like you would with a normal multi-threaded program.
That's pretty much it.
|
|
|
|
|
that i know and read in many books but i want some concrete examples. please help me.
|
|
|
|
|
Can any body tell me the what code i write in client to check the concurrency.
|
|
|
|