|
Hi
i have a simple expander control with a button, here is my xaml code :
<Grid>
<Expander Name="expander1" Margin="10" IsExpanded="True" Background="Silver"
Collapsed="expander1_Collapsed" Expanded="expander1_Expanded">
<Expander.Header>
<Image Source="E:\Tutorial\FullComponent\Ajax Loader\ajax-loader2.gif"></Image>
</Expander.Header>
<Expander.Content>
<Button Margin="20" Height="30" Name="button1" Click="button1_Click">Click Me</Button>
</Expander.Content>
</Expander>
</Grid>
my problem is that how to animate expander control (callopsing/expanding)?
thanks
|
|
|
|
|
This[^] might help. It helped me when I did the same.
|
|
|
|
|
How can we parse or read a complete .eml file in silverlight and display the information and c# .
Please provide me the solution code for it.
Thanks
|
|
|
|
|
HI
Can any ley me know, what are the adavantages of Silver light for the user who is using silver light application, kindly reply ASAP, thankx in advance.
|
|
|
|
|
I ‘m working on audio conferencing in - WCF, WPF and Visual Studio 2008 using C#. I capture the sound from microphone using Windows API. Then I continuously capture the sound from microphone and send the Audio stream (byte[]) to the server and broadcast from there. Its working fine and I also get the response from the server as well. Then I play the Audio Stream(byte[]) coming from the server.
I used this article in codeproject website to record and play audio stream.
http://www.codeproject.com/KB/audio-video/cswavrec.aspx
But when the incoming audio stream is playing, an unrecognizable sound is coming. This may be due to the difference between data consuming and receiving rates.
I also used directsound to record and playing sound but the same problem arise.
So please suggest me how to solve this problem( Better DierctSound suggestion – Streaming Buffer) .
This code is fire when audio stream is received from the server.
private void playAudio()
{
objAudioConferencingPlayer.StartAudioPlayer(IncommingAudioStream);
}
public void StartAudioPlayer(byte[] AudioStream)
{
if (!IsPlayerRunning)
{
StopPlaying();
m_Player = new WaveOutPlayer(-1, fmt, 16384, 3, new
BufferFillEventHandler(Filler));
IsPlayerRunning = true;
}
m_Fifo.Write(AudioStream, 0, AudioStream.Length);
}
private void Filler(IntPtr data, int size)
{
if (m_PlayBuffer == null || m_PlayBuffer.Length < size)
m_PlayBuffer = new byte[size];
if (m_Fifo.Length >= size)
m_Fifo.Read(m_PlayBuffer, 0, size);
else
for (int i = 0; i < m_PlayBuffer.Length; i++)
m_PlayBuffer[i] = 0;
System.Runtime.InteropServices.Marshal.Copy(m_PlayBuffer, 0, data, size);
}
Thanks in Advance.
|
|
|
|
|
Hi
I have a simple question regarding following code.
How do I save whatever shown within the border tags into a image file such as tiff?
<Window x:Class="Canvas.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="Window1" Height="300" Width="300">
<Border x:Name="myborder" BorderBrush="Black" BorderThickness="1" Width="2.1in" Height="2.02in">
<Canvas Width="2.1in" Height="2.02in">
<Rectangle Width="1.625in" Height="1.625in" Stroke="Black" StrokeThickness="0.6pt" Canvas.Left="33" Canvas.Top="18" />
</Canvas>;
</Border>;
</Window>;
|
|
|
|
|
|
Can any one help.
I am using visual studio 2005.
I have created custom control using Custom Control Library(WPF) and I have tried add this custom control in Windows Application(WPF).
1)right click choose item in tool box
2)click the browse button and select the custom control dll.
but custom control did not add in toolbox .
|
|
|
|
|
Hello,
I am trying to build an UI with different "pages" (xaml as usercontrols) which are showed when some
buttons in the principal shell are pushed.
The principal shell creates an object during inialization whose properties I would like to change
using the usercontrol UI´s.
Whe doing this with Windows Forms it was enough to me to pass the main object as reference to other forms class. Now I am trying to do this in WPF but for some reason the main object dissapears.
Which could be the problem?
Thanks
|
|
|
|
|
Can any one Help
I mean, I want to create a application that has a toolbox and drag the controls from toolbox and drop in the workspace. Once we drop the controls in workspace, the properties related to that particular control should be displayed in property Panel.Once we change the properties it should affect the workspace controls.(This Application like Visual studio toolbox and property box)
can any one give some Idea.
|
|
|
|
|
Why did you delete your post below? You should have clarified that post rather than leaving my answer to it dangling.
Anyway - you're obviously going to have to write a property grid control and populate it with the properties using Reflection. That's a fair bit of work there.
|
|
|
|
|
|
I'm not sure what you're asking. What do you need help with?
|
|
|
|
|
Hi,
Im using WPF for designing the form.im having a dockpanel in the dockpanel i have splited into two regions by using the following code
<Border Height="50" x:Uid="Left" CornerRadius="0,0,40,40" Background="#81a4d1" BorderBrush="#4D6C82" BorderThickness="1" DockPanel.Dock="left">
</Border>
<Border Width="200" x:Uid="Right" Background="#b2ccec" BorderBrush="#4D6C82" BorderThickness="1" DockPanel.Dock="right">
</Border>
Then im having two buttons namely Client and Product in the left border and im having two stack panel with some controls related to client and product.now if im clicking client button means the client information related stackpanel should be visible and if i click product button means the product related stackpanel should be visible, how can i achieve this?
i have tried the below code but its getting hidden but the alternate panel is not getting visible..
private void BtnClient_Click(object sender, RoutedEventArgs e)
{
StkClient.Visibility = Visibility.Visible;
StkProduct.Visibility = Visibility.Hidden;
}
private void BtnProduct_Click(object sender, RoutedEventArgs e)
{
StkProduct.Visibility = Visibility.Visible;
StkClient.Visibility = Visibility.Hidden;
}
Rgrds
Kanna
|
|
|
|
|
Hi all,
I want to call my old web service of dot net 2.0 but I have received error like "TargetInvocationException" while calling.
Can anybody help in this situation ?
Regards,
M.Fasih Akbar
fasih_is_my_signature
|
|
|
|
|
I have a couple questions for WPF that I hope have simple answers:
Suppose I want to make my interface modular and abstract, so that I don't need to group everything into a single xaml file. What is the simplest and most efficient way to dynamically swap out pieces of a xaml interface?
In WinForms this could be done simply by using panels, and changing the child control(s) of the panel. Is there a similar idea in WPF?
And relatedly, what's the best way to define xaml fragments that aren't entire windows themselves. User controls? Pages?
And finally (bonus, unrelated question): is WPF layout strictly grid/hierarchically-based? If I want a fragment such as the above to appear floating over the other elements in a window/grid, can i do that without creating a new window?
In your debt,
Logan
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
logan1337 wrote: Suppose I want to make my interface modular and abstract, so that I don't need to group everything into a single xaml file. What is the simplest and most efficient way to dynamically swap out pieces of a xaml interface?
The architecture you want to consider is the Composite Application Guidance[^]. This architecture is designed to apply the "hot swapping" because it uses IoC. Please have a look at this[^] link for more details.
logan1337 wrote: And relatedly, what's the best way to define xaml fragments that aren't entire windows themselves. User controls? Pages?
Well - I'm partial to User controls myself.
logan1337 wrote: If I want a fragment such as the above to appear floating over the other elements in a window/grid, can i do that without creating a new window?
Oh yes - WPF is full of funky 3D goodness that allows you to move elements through 3D space.
|
|
|
|
|
Thanks I will take a(nother) look at that. I had skimmed it earlier, but I thought that since it required an actual DLL that it was something way more than what I was looking for.
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
logan1337 wrote: but I thought that since it required an actual DLL that it was something way more than what I was looking for.
I hate to say this, but it drops in quite a few. You get the Unity Dll as well.
|
|
|
|
|
:P
I'm just surprised that WPF wasn't designed to be modular from the start. It seems too web-page-like, when even web pages are now becoming dynamic and modular.
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
logan1337 wrote: I'm just surprised that WPF wasn't designed to be modular from the start. It seems too web-page-like, when even web pages are now becoming dynamic and modular
Well, the big issue with WPF is that it's totally different to Win Forms programming, so the standards and techniques are being defined by the gods of WPF (like the Rockstar, Dr WPF, Sacha and the Molenator).
|
|
|
|
|
Different is fine if it's an improvement, but I am really feeling lost that what I want to do is not immediately doable. I can understand when the designers (or "gods") tell you you can't do something the old way because the new way is clearly better (like, say, MVC) but I don't see that as being the case here, at least at my current level of understanding.
I mentioned in my rant in the lounge how un-obvious it is to build and share contextual menus between multiple sources, or really to handle any kind of dynamic generation--allow me to ask you this:
Suppose I have an objective encapsulation of a "command" that can be applied to an object, and I want those commands to appear in a contextual menu when the target object is right-clicked. The name, icon, tool tip, etc. should all be figured-out from the command itself, and not statically "baked into" the interface. Furthermore, the actual selection of commands should be dynamic, based on some method that runs.
I want each MenuItem to be dynamically generated based on these "rules", and constructed based on properties of the command (i.e. the name, icon, etc.), and then to populate that context menu with the generated items... but more complicated things I would like to use (as I mentioned in the original question) an abstract modular approach, where I can define the rendering of a particular object dynamically based on an abstract XAML object, such as a user control.
Is this still possible in WPF? Obviously it isn't in XAML, but tell me I can still perform this kind of dynamic generation in code. Maybe I have the wrong impression of WPF because I'm trying to do everything in XAML when I should be looking at the programmatic methods.
Your thoughts?
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
You can reuse items just by giving them a key. A really fun thing to do is to define your item in a different assembly which can be loaded at runtime, just by using ContextMenu={DynamicResource MyMenu} in your item.
|
|
|
|
|
That's good to know. Guess I was just looking in the wrong places.
“Time and space can be a bitch.”
–Gushie, Quantum Leap
{o,o}.oO( Looking for a great RSS reader? Try FeedBeast! )
|)””’) Built with home-grown CodeProject components!
-”-”-
|
|
|
|
|
i need a basics of silverlight 1.0&^1.1&2
|
|
|
|