|
Hi!
I tried the z-index:-1 but it didn't seem to work.
edit:
but i found a solution that i tested and worked
Add
<param name="windowless" value="true" />
on the aspx or html page when you add the Silverlight element in the <object> tag
modified on Thursday, November 25, 2010 3:24 AM
|
|
|
|
|
Thanks for posting a solution.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hi,
I am trying to make a rounded TextBox like this:
<Border BorderBrush="Black" BorderThickness="3" CornerRadius="8" >
<TextBox Width="300" Height="30" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="0,10,0,0" />
</Border>
but instead I get a stretched border to the surrounding Grid and a regular TextBox in the middle of the border.
What am I doing wrong ?
|
|
|
|
|
1) When you add a Border around a TextBox, you're... adding a border AROUND the textbox. You're not replacing the existing one.
2) The border is stretching because its HorizontalAlignment and VerticalAlignment are defaulting to Stretch. Move those from the TextBox to the Border. You probably also want to move the Margin, as otherwise you're telling the TextBox to leave ten pixels between it and the border (Unless that's what you want).
This is probably, however, the wrong way to go about this... You don't really want to add a border object. You want to re-style the TextBox to change its existing border. If you're new to WPF, your best bet is probably just to find some code on the web to do this... Google "wpf rounded textbox", and you'll be flooded with options.
|
|
|
|
|
The border is stretching because its HorizontalAlignment and VerticalAlignment are defaulting to Stretch
Thank you, that was the problem, but not only. Now that the border sticks to the texbox, the edges of it are still "square" and the rounded border is just around it.
I got this code from web and wonder how can it work for somebody
<Border BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="8,8,8,8">
<TextBox/>
</Border>
Anyway, I re-styled the textbox with template and it works very nice. Thanks again.
|
|
|
|
|
Glad to help
|
|
|
|
|
well generally a control template is applied if you want change the appearance of a Control. Its just that a control's visual tree is changed. Like for a rounded button, we have to replace the button with a border with a specified corner radius and then provide some animation(storyboard) to make it feel like a Button and still it will be having the Click event!
|
|
|
|
|
Remove Height and Width from Textbox, so that it takes the same from the Border.
It should work fine.
-
Bits and Bytes Rules!
10(jk)
|
|
|
|
|
i want to write some control that will contain 2 button and listView.
Pressing button 1 will scroll the listview up.
Pressing button 2 will scroll the listview down.
The direct scroll of the listview will be unavailable - ( will be invisible ? ).
1. I don't find the listview method 'scroll-up' / 'scroll-down' that i could callon the button event.
2. How can i make the listview scroll to be always visible ?
Someone can help me here ?
Thanks.
|
|
|
|
|
One way to do this is to get the ScrollViewer inside the ListView. In the following sample, I demonstrate how to get the scroll viewer of a ListView called myListViewInstance.
public static T FindChild<T>(DependencyObject child) where T : FrameworkElement
{
if (child.GetType() is typeof(T)) return child;
for (int count = 0; count < VisualTreeHelper.GetChildrenCount(child); count++)
{
var childItem = VisualTreeHelper.GetChild(child, count);
var result = FindChild(childItem);
if (result == null) continue;
return result;
}
return null;
}
private ScrollViewer _instanceViewer;
private void ScrollUp()
{
if (_instanceViewer == null)
_instanceViewer = FindChild<ScrollViewer>(myListViewInstance);
if _instanceViewer == null) return;
_instanceViewer.LineUp();
}
private void ScrollDown()
{
if (_instanceViewer == null)
_instanceViewer = FindChild<ScrollViewer>(myListViewInstance);
if _instanceViewer == null) return;
_instanceViewer.LineDown();
}
I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be Forgive your enemies - it messes with their heads
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Are you looking for this[^]?
|
|
|
|
|
That is some kick ass Post you got Kunal.
Uday
|
|
|
|
|
|
AFAIK there is not.
However, after elevating your project to full trust in SL4, you can use some of .Net's built in classes.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hi Sri Abhinav,
Hope this is not too OT: but: what are the implications of elevating a project to full trust in SL4 for end users who deploy the appplication ?
"Many : not conversant with mathematical studies, imagine that because it [the Analytical Engine] is to give results in numerical notation, its processes must consequently be arithmetical, numerical, rather than algebraical and analytical. This is an error. The engine can arrange and combine numerical quantities as if they were letters or any other general symbols; and it fact it might bring out its results in algebraical notation, were provisions made accordingly." Ada, Countess Lovelace, 1844
|
|
|
|
|
Found this[^] intersting article that might be a good read if you've not come across it before.
"Although trusted applications do not have full access to the host computer, they can access personal data and potentially cause harm. Therefore, you should treat them as full-trust applications when you perform security evaluations and audits. To prevent users from installing or running trusted applications, system administrators can use machine policy settings to deny access, as described in the "Policy Restrictions for Elevated Trust" section of this topic."
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
Hi everyone!
Has anyone worked with QR barcode using WPF? Is there a free library for Wpf?
modified on Tuesday, November 23, 2010 2:43 PM
|
|
|
|
|
Big blinking stock trading screens - would you recommend WPF?
Note, i'm fully aware of this article[^]
But, from my own experience, as well as from experience from other guys who do demanding apps, that WPF is slow.
dev
|
|
|
|
|
In my experience, WPF is nice and quick, as long as you have a decent computer... It takes advantage of your GPU for rendering, so it's better if you have a decent video card (Not talking a gaming machine - Just something that's not completely obsolete).
Sure, C++ would be faster, but that's always true.
(Context: I write portfolio management software for a hedge fund in C#/WPF)
|
|
|
|
|
(Context: I write portfolio management software for a hedge fund in C#/WPF)
yes, buy side apps less demanding than blinking day trades apps (whether pricer with real time analytics or just trades with pnl)
I suspect primary cause we access the app through Xenapp - I hear each scroll is equivalent to wiring down a bitmap! so, even with a grid with few hundred records it's a little laggy.
dev
|
|
|
|
|
Not familiar with Xenapp, but I'm going to guess that's some kind of remoting setup...
If the graphics were being handled on the client side, it would be nice and quick... But if you're sending the graphics down the pipe, you'll never get the performance you want. If I were you, I'd start looking into any known issues with Xenapp and WPF... Maybe there's a way to get it to properly render the graphics on the client side.
|
|
|
|
|
The problem here, isn't WPF, it's the use of virtual application environment. It's unfair to label WPF as unresponsive when the whole underlying delivery mechanism is the cause. It's like blaming some guy sitting in the stands for Alonso not winning F1 this season.
|
|
|
|
|
Web based page - then try Silverlight.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
My latest tip/trick
Visit the Hindi forum here.
|
|
|
|
|
most of these apps are client server apps done in WIN32
if WPF don't cut it, unlikely Silverlight will
Again, from different friends from big firms I know both WPF and Silverlight are choosen but some disappointment as apps not as snappy as one would expect.
dev
|
|
|
|
|
I'm tryin to define this namespace:
xmlns:my="clr-namespace:MyProject"
And while intellisense says it's there ("MyProject in assembly MyProject"), after I accept it from the intellisense box, the namespace gets underlined and I get an intellisense error stating that the namespace can't be found.
WTF?!
.45 ACP - because shooting twice is just silly ----- "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." - J. Jystad, 2001
|
|
|
|