Skip to main content

Microsoft Silverlight

Answered Question Progressbar with Opacity EffectRSS Feed

(0)

balaji.narasimhan@in.soliver.com
balaji.n...

Member

Member

10 points

45 Posts

Progressbar with Opacity Effect

Hi People,

I Have a Req Where i need to Display a Progressbar with Opacity Effect with the Background In LightBox or whatever you call.
I Hope you are Getting My Picture .

With its Background in Opacity Effect and so on.

Thanks

Regards

N.Balaji

 

bharathkumars87
bharathk...

Member

Member

280 points

51 Posts

Re: Progressbar with Opacity Effect

 

if you prefer managed code splash screen, than nice framework for it here:

http://www.codeplex.com/SilverlightLoader

 And if you simulate progressbar using BLOCKED SCRIPT

Splash.xaml:

<Grid xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Background="Black" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" >
  <Grid Height="Auto" HorizontalAlignment="Center" VerticalAlignment="Center" Width="Auto">

    <Rectangle x:Name="progressBarBackground" Stroke="#FF33D3D4" StrokeThickness="1" Height="14" Margin="120,0,131,104" VerticalAlignment="Bottom" Width="200"/>
    <Rectangle x:Name="progressBar" Fill="#FF33D3D4" Width="0" Height="14" HorizontalAlignment="Left" Margin="120,0,0,104.5" VerticalAlignment="Bottom"/>
    <TextBlock x:Name="progressText" Text="0%" FontSize="11" Foreground="#FFFFFFFF" Margin="0,0,0,104" Width="30" HorizontalAlignment="Center" VerticalAlignment="Bottom" Height="16"/>
  </Grid>
</Grid>

SplashProgress.js

function onSourceDownloadProgressChanged(sender, eventArgs)
{
sender.findName("progressText").Text = Math.round((eventArgs.progress * 100))+ "%";
sender.findName("progressBar").Width = eventArgs.progress * sender.findName("progressBarBackground").Width;
}

bharath kumar.s
Please "Mark as Answer" if this post answered your question. :)

bharathkumars87
bharathk...

Member

Member

280 points

51 Posts

Re: Progressbar with Opacity Effect

 http://weblogs.asp.net/lduveau/archive/2009/09/05/tutorial-create-a-custom-silverlight-splash-screen.aspx

bharath kumar.s
Please "Mark as Answer" if this post answered your question. :)

balaji.narasimhan@in.soliver.com
balaji.n...

Member

Member

10 points

45 Posts

Re: Re: Progressbar with Opacity Effect

Hi Bharath,

Well am using The Progressbar control in My  c# Code .

So i wanna Trigger the Progress bar with Light box effect in the backgroundsadf

sasideva
sasideva

Member

Member

240 points

58 Posts

Re: Progressbar with Opacity Effect

I think you are looking for model popup with progress bar. am i correct?

Regards,
Deva

balaji.narasimhan@in.soliver.com
balaji.n...

Member

Member

10 points

45 Posts

Re: Re: Progressbar with Opacity Effect

Yes Sasi Exactly that is what am looking for

http://www.raaga.com/channels/TAMIL/moviedetail.asp?mid=TD00710

plz refer this site and click download  you will get progress bar with modal effect.

Any help Appreciated.

Thanks

Regards

N.Balaji

balaji.narasimhan@in.soliver.com
balaji.n...

Member

Member

10 points

45 Posts

Re: Re: Re: Progressbar with Opacity Effect

Any Help plz

 

bharathkumars87
bharathk...

Member

Member

280 points

51 Posts

Re: Re: Re: Re: Progressbar with Opacity Effect

 http://forums.silverlight.net/forums/p/86320/202076.aspx

bharath kumar.s
Please "Mark as Answer" if this post answered your question. :)

sasideva
sasideva

Member

Member

240 points

58 Posts

Re: Re: Re: Re: Progressbar with Opacity Effect

Hi,

Use child window like this. inside child window you keep normal silverlight progress bar . then it will looking exactly what you need

Childwindow Example

http://www.c-sharpcorner.com/UploadFile/dpatra/CustomChildWindowInSilverlight308012009140924PM/CustomChildWindowInSilverlight3.aspx

 Progress bar

<ProgressBar x:Name="myBar" Width="Auto" IsIndeterminate="True"

HorizontalAlignment="Stretch" Value="0"

Height="20"

Margin="2" />

Regards,
Deva

balaji.narasimhan@in.soliver.com
balaji.n...

Member

Member

10 points

45 Posts

Re: Re: Re: Re: Re: Progressbar with Opacity Effect

Hi Sasi Thanks for your Reply.

However When Can i Trigger this Child window With Progress bar in My c# code like i normally Call from My c# code Like this.

RadProgressBar MyProgressBar = new RadProgressBar(); MyProgressBar.Width = 400; MyProgressBar.Height = 30;
                Thickness thk1 = new Thickness(5);
                MyProgressBar.Margin = thk1;
                MyProgressBar.Width = 260;
                MyProgressBar.Height = 30;
                MyProgressBar.IsIndeterminate = true;
                Canvas.SetLeft(MyProgressBar, 261.00);
                Canvas.SetTop(MyProgressBar, 285.00);
                this.rightpane.Children.Add(MyProgressBar);

 

Thanks

Regards

N.Balaji

balaji.narasimhan@in.soliver.com
balaji.n...

Member

Member

10 points

45 Posts

Re: Re: Re: Re: Re: Re: Progressbar with Opacity Effect

Well Child Window Creates Kind of Window Format with Close Buttons

Sasi plz go to the Link that i Mentioned .

I want Exactly in that style.

Thanks

Regards

N.Balaji

sasideva
sasideva

Member

Member

240 points

58 Posts

Re: Re: Re: Re: Re: Re: Re: Progressbar with Opacity Effect

Hi,

1) use popup window . inside the popup window use progress bar.

<Popup x:Name="myPopup" IsOpen="False" HorizontalAlignment="Center" HorizontalOffset="-210" VerticalOffset="-150" VerticalAlignment="Center">

<Grid Height="Auto" x:Name="Grd_LayoutPopup" Width="454">

Here you keep your progress bar

</Grid>

</Popup>

 Then Canvas also required

 <Canvas x:Name="myCanvas" Visibility="Collapsed" Background="Black" Opacity=".4"></Canvas>

Button click following code

if  

myPopup.IsOpen = true;

myCanvas.Visibility = Visibility.Visible;

 

esle

myPopup.IsOpen = false;

myCanvas.Visibility = Visibility.Collapsed;

I think this will work . Because i used samething.

 

Regards,
Deva

balaji.narasimhan@in.soliver.com
balaji.n...

Member

Member

10 points

45 Posts

Re: Re: Re: Re: Re: Re: Re: Re: Progressbar with Opacity Effect

Hey Sasi,

Can you please be specific.

I mean If use Child window it shows its Window controls like close button and so on.

do i need to do any aditional coding or what

 

sasideva
sasideva

Member

Member

240 points

58 Posts

Answered Question

Re: Re: Re: Re: Re: Re: Re: Re: Re: Progressbar with Opacity Effect

Your child window code somthing like this

<controls:ChildWindow x:Class="MouseWheelScrolling.ChildWindow1"

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"

Width="400" Height="300" HasCloseButton="False" >

<Grid x:Name="LayoutRoot" Margin="2">

<Grid.RowDefinitions>

<RowDefinition />

<RowDefinition Height="Auto" />

</Grid.RowDefinitions>

</Grid>

</controls:ChildWindow>

Regards,
Deva

balaji.narasimhan@in.soliver.com
balaji.n...

Member

Member

10 points

45 Posts

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Progressbar with Opacity Effect

Ok

is this Correct

 

<controls:ChildWindow x:Class="ProdShowcase.ChildWindowprogress"
           xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
Width="260" Height="20" HasCloseButton="False" >
   <Grid x:Name="LayoutRoot" Margin="2">
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <ProgressBar x:Name="myBar" Width="Auto" IsIndeterminate="True"
HorizontalAlignment="Stretch" Value="0" Height="20"
Margin="2" />

    </Grid>
</controls:ChildWindow>

Moreover  How do i Trigger this in C#

button click

is it Like 

Popup ChildWindowprogress;

ChildWindowprogress.IsOpen=True;

If so amnot getting the Desired Effect.

Plz Help

 

balaji.narasimhan@in.soliver.com
balaji.n...

Member

Member

10 points

45 Posts

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Progressbar with Opacity Effect

 ChildWindowprogress chwp = new ChildWindowprogress();
                chwp.Show();

Now My Progressbar doesnt Run and Remain iddle.

I want that To be Automatically Closed whenever my Function Gets Finishes or do i need to set timer  for it.

Thanks

Regards

 

sasideva
sasideva

Member

Member

240 points

58 Posts

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Progressbar with Opacity Effect

http://www.c-sharpcorner.com/UploadFile/yougerthen/311172008084236AM/3.aspx

Use timer and then make it close

Regards,
Deva

balaji.narasimhan@in.soliver.com
balaji.n...

Member

Member

10 points

45 Posts

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Progressbar with Opacity Effect

Hey Sasi,

I Cant use Timer Here Because i need to Display the Progress bar until My Func gets Executed.

Any other way

Thanks'

sasideva
sasideva

Member

Member

240 points

58 Posts

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Progressbar with Opacity Effect

After the Execution give this code

ChildWindow1 win = new ChildWindow1();

win.Close();

 

Regards,
Deva

balaji.narasimhan@in.soliver.com
balaji.n...

Member

Member

10 points

45 Posts

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Progressbar with Opacity Effect

Hey Guys I Have Tried the above steps but in Vain.

http://img28.yfrog.com/i/lightbox.jpg/

I would like to Display exactly like it is shown above.

As of now I have Just Dragged and Dropped the <Progressbar  and Set indeterminate=true .It gets Loaded until it gets the Response from WCF.

Moreover How to Add the Text in the Progressbar.

Thanks

Regards

N.Balaji

balaji.narasimhan@in.soliver.com
balaji.n...

Member

Member

10 points

45 Posts

Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Re: Progressbar with Opacity Effect

Hey People,

Why no one are turning up.

Plz am in desperate need of it.

Thanks

hsampat
hsampat

Member

Member

8 points

4 Posts

Re: Progressbar with Opacity Effect

Hi, Try using callback mechanism in WCF. http://www.csharpcorner.com/UploadFile/john_charles/CallbackoperationsinWindowsCommunicationFoundation06112007120551PM/CallbackoperationsinWindowsCommunicationFoundation.aspx

  • Unanswered Question
  • Answered Question
  • Announcement
Microsoft Communities