How to get transparency scroll bar to view background image of canvas.

HI, 
How to get transparency to path in canvas to view background image in canvas using scroll bar control.?
This is my present output:
My Xaml Code:
<Grid Height="auto" Name="grid1">
<TabControl Background="Bisque">
<TabItem Header="Tools">
<Grid Height="1000" Width="1000" Name="grid">
<Border BorderThickness="0.2" BorderBrush="Black" Height="820" Width="820" ClipToBounds="True" Margin="90,99,90,81"></Border>
<Grid>
<Button Content="Original Size" Height="23" Name="btn_Original" Width="75" Click="btnOriginalSizePosition" Margin="4,4,921,973" />
<TextBox Height="20" HorizontalAlignment="Left" Margin="62,49,0,0" x:Name="txtNoOfZones" VerticalAlignment="Top" Width="49"
MaxLength="2" PreviewTextInput="txtNoOfZones_PreviewTextInput"/>
<TextBox Height="20" HorizontalAlignment="Right" Margin="0,71,890,0" x:Name="txtSec" VerticalAlignment="Top" Width="49" PreviewTextInput="txtSec_PreviewTextInput" MaxLength="3"/>
<Button Content="OK" Height="32" HorizontalAlignment="Left" Margin="117,59,0,0" Name="btnNoOfZones" VerticalAlignment="Top" Width="39" Click="btnNoOfZones_Click" />
<Label Content="Zone Number selected :" Height="28" HorizontalAlignment="Right" Margin="0,0,451,0" Name="lblZone" VerticalAlignment="Top" />
<Label Content="Sector Number in selected Zone :" Height="28" HorizontalAlignment="Right" Margin="364,22,451,0" Name="lblSector" VerticalAlignment="Top" />
<Label Content="Filled Color applied in selected sector :" Height="28" HorizontalAlignment="Right" Margin="336,44,451,0" Name="lblColor" VerticalAlignment="Top" />
<Label HorizontalAlignment="Left" Margin="569,0,0,0" Name="lblZoneNumber" Height="28" VerticalAlignment="Top" />
<Label Height="28" HorizontalAlignment="Left" Margin="569,22,0,0" Name="lblSectorNumber" VerticalAlignment="Top" />
<Label Height="30" HorizontalAlignment="Left" Margin="569,44,0,0" Name="lblFillColor" VerticalAlignment="Top" FontWeight="Bold"/>
<Label Content="Sectors :" Height="28" HorizontalAlignment="Left" Margin="7,67,0,905" Width="69" />
<Label Content="Zones :" HorizontalAlignment="Left" Margin="13,44,0,928"/>
<TextBlock Height="23" HorizontalAlignment="Left" Margin="4,32,0,0" Text="Change No.of Zones, sectors below and click OK button" VerticalAlignment="Top" Width="294" FontFamily="Cambria" FontSize="12" FontStyle="Italic" FontWeight="Bold" />
<RadioButton Content="Single Sector" Height="16" HorizontalAlignment="Left" Margin="744,24,0,0" Name="rBtnSingleSector" VerticalAlignment="Top" GroupName="Selection"/>
<RadioButton Content="Sector Zone" Height="16" HorizontalAlignment="Left" Margin="744,44,0,0" Name="rBtnSectorZone" VerticalAlignment="Top" GroupName="Selection"/>
<RadioButton Content="Circular Zone" Height="16" HorizontalAlignment="Left" Margin="744,64,0,0" Name="rBtnCircularZone" VerticalAlignment="Top" GroupName="Selection"/>
<RadioButton Content="Panning" Height="24" HorizontalAlignment="Left" Margin="744,4,0,0" Name="rBtnPanning" VerticalAlignment="Top" Width="74" GroupName="Selection"/>
<Border x:Name="clipBorder" BorderBrush="Black" BorderThickness="0" ClipToBounds="True" Height="810" Width="810" Margin="95,104,95,86" CornerRadius="10">
<Canvas x:Name="CanvasPanel" Height="800" Width="800" Background="Transparent" ClipToBounds="True"></Canvas>
</Border>
<RadioButton Content="Random Color" HorizontalAlignment="Left" Margin="868,5,0,979" Name="rdBtnRandomColor" GroupName="rdbtnGroupFillColor"/>
<RadioButton Content="Red Color" Height="16" HorizontalAlignment="Left" Margin="868,24,0,0" Name="rdBtnRedColor" VerticalAlignment="Top" GroupName="rdbtnGroupFillColor" Foreground="#FFF81010" FontWeight="Bold" />
<RadioButton Content="Green Color" Height="16" HorizontalAlignment="Left" Margin="868,44,0,0" Name="rdBtnGreenColor" VerticalAlignment="Top" GroupName="rdbtnGroupFillColor" Foreground="#FF175F17" FontWeight="Bold" />
<RadioButton Content="Adjacent" Height="16" HorizontalAlignment="Left" Margin="435,81,0,0" Name="rdBtnAdjacent" VerticalAlignment="Top" GroupName="Selection" />
</Grid>
</Grid>
</TabItem>
<TabItem Header="Change Background">
<Grid Height="1000" VerticalAlignment="Top" Background="Bisque">
<Button Height="70" Width="70" Margin="6,1,892,929" Name="btnBrowseImage" Click="btnAll">
<Image x:Name="browseIcon" Source="D:\WPF\Projects\TabControlVRI_18_12_2014\Images\img.png" MouseLeftButtonDown="Image_MouseLeftButtonDown_1"/>
</Button>
<Button Height="70" Width="70" Margin="92,1,806,929" Name="btnCenterPoint" Click="btnAll">
<Image x:Name="centerIcon" Source="D:\WPF\Projects\TabControlVRI_18_12_2014\Images\center.jpg" Width="54" Height="48" />
</Button>
<Button Height="70" Width="70" Margin="179,1,719,929" Click="btnAll">
<Image x:Name="boundaryIcon" Source="D:\WPF\Projects\TabControlVRI_18_12_2014\Images\Path_Simple.png" Height="44" Width="49" />
</Button>
<Image Name="imgBackground" Height="800" Width="800" MouseLeftButtonDown="imgBackground_MouseLeftButtonDown">
</Image>
</Grid>
</TabItem>
</TabControl>
</Grid>
C# code:
OpenFileDialog op = new OpenFileDialog();
ImageBrush ib = new ImageBrush();
private void Image_MouseLeftButtonDown_1(object sender, RoutedEventArgs e)
op.Title = "Select a picture";
op.Filter = "All supported graphics|*.jpg;*.jpeg;*.png|" +
"JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|" +
"Portable Network Graphic (*.png)|*.png";
if (op.ShowDialog() == true)
ib.ImageSource = new BitmapImage(new Uri(op.FileName));
imgBackground.Source = new BitmapImage(new Uri(op.FileName));
CanvasPanel.Background = ib;
Please help me out to get transparency for path in canvas to view background image in canvas.
The complete code is in below link:
https://onedrive.live.com/redir?resid=876CFAE94C306176!112&authkey=!AC1sQIYwyoRYT_o&ithint=file%2crar
Regards,
Viswa.

Hi ViswAmmu,
>>Please help me out to get transparency for path in canvas to view background image in canvas.
If I'm not misunderstanding, I think you just need to loop through all Canvas.Children and set Opacity property for them:
private void Image_MouseLeftButtonDown_1(object sender, RoutedEventArgs e)
//Loop through all children items
foreach(UIElement v in CanvasPanel.Children)
v.Opacity = 0;
op.Title = "Select a picture";
op.Filter = "All supported graphics|*.jpg;*.jpeg;*.png|" +
"JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|" +
"Portable Network Graphic (*.png)|*.png";
if (op.ShowDialog() == true)
ib.ImageSource = new BitmapImage(new Uri(op.FileName));
imgBackground.Source = new BitmapImage(new Uri(op.FileName));
CanvasPanel.Background = ib;
Screenshot:
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey.

Similar Messages

  • How to get a scroll bar to the applications popup by default?

    How to get a scroll bar to the applications popup by default when clicked the applications folder from the dock? If I have so many applications that they do not fit in the default area, I have to find out myselft that I have to scroll the content before the scroll bar appears. This leads to "where is my missing applications questions" by the novice users with Mountain Lion.

    System Preferences > General > Show scroll bars.
    Click the button by the side of "Always".
    Best.

  • How to get a scroll bar for nodes?

    How to get the scroll bar to work with the javafx.scene.layout.container.
    I tried putting in one but the SwingScrollPane requires SwingComponent.
    How do I put my fx nodes inside it.
    I could not find any way to cast the node objects into SwingComponent.

    Hi,
    Here's a little sample with custom scrollNode
    You must modify the code but you can start with it.
    * ScrollNode.fx
    * Created on 14 mars 2009, 14:53:55
    package fxtests;
    import fxtests.ScrollNode;
    import java.lang.Object;
    import javafx.ext.swing.SwingSlider;
    import javafx.scene.CustomNode;
    import javafx.scene.Group;
    import javafx.scene.Node;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.LinearGradient;
    import javafx.scene.paint.Stop;
    import javafx.scene.Scene;
    import javafx.scene.shape.Rectangle;
    import javafx.scene.text.Text;
    import javafx.stage.Stage;
    import javafx.scene.text.TextOrigin;
    * @author Alex
    public class ScrollNode extends CustomNode {
        public-init var node: Node;
        public-init var nodeWidth: Number;
        public-init var nodeHeight: Number;
        public var scrollHeight = 20;
        public var width = 200;
        public var height = 200;
        public var posX: Integer = 0 on replace {
            node.translateX = -posX
        public var posY: Integer =
        nodeWidth - width as Integer on replace {
            node.translateY = posY-(nodeWidth - width)
        public override function create(): Node {
            return Group {
                content: [
                    SwingSlider {
                        value: bind posX with inverse
                        minimum: 0
                        maximum: nodeWidth - width as Integer
                        width: width
                        height: 20
                        translateX: 20
                        vertical: false;
                    SwingSlider {
                        value: bind posY with inverse
                        minimum: 0
                        maximum: nodeHeight - height as Integer
                        height: height
                        width: 20
                        translateY: 20
                        vertical: true
                    Group {
                        translateX: scrollHeight
                        translateY: scrollHeight
                        clip: Rectangle {
                            width: width
                            height: height
                        content: node
                    Text {
                        translateX: scrollHeight+10
                        translateY: scrollHeight+10
                        textOrigin: TextOrigin.TOP
                        content: bind "node position: {node.translateX}, {node.translateY}"
    function run() {
        Stage {
            title: "ScrollNode"
            scene: Scene {
                width: 400
                height: 400
                content: [
                    ScrollNode {
                        width: 200
                        height: 200
                        nodeHeight: 500
                        nodeWidth: 500
                        node: Rectangle {
                            width: 500
                            height: 500
                            fill: LinearGradient {
                                startX: 0.0
                                startY: 0.0
                                endX: 1.0
                                endY: 1.0
                                stops: [
                                    Stop {
                                        color: Color.WHITE
                                        offset: 0.0
                                    Stop {
                                        color: Color.BLACK
                                        offset: 1.0
    }

  • Does anybody know how to get a scroll bar for a long list of podcasts when selcting some for sync? Thanks

    Does anybody know how to get a scroll bar for a long list of podcasts when selcting some for sync? Thanks

    Hi lbadek
    I can help with this please send us an email using the contact the mods link in my proifle and we will investigated from there.
    Thanks
    Stuart
    BTCare Community Mod
    If we have asked you to email us with your details, please make sure you are logged in to the forum, otherwise you will not be able to see our ‘Contact Us’ link within our profiles.
    We are sorry that we are unable to deal with service/account queries via the private message(PM) function so please don't PM your account info, we need to deal with this via our email account :-)

  • How to get Auto scroll bar in a JSP?

    Hi Gurus,
    I have created a custom jsp page in a B2B application. How to get the auto scroll bar when page is exceeded than it can display?
    Is there any specific tag or div which is to be included to get this scroll bar?
    Thanks a lot in advance!!
    Regards,
    Lakshman.

    Hi Lakshman,
    You can include it in stylsheet and then use that class in your <body> or "div"  tag.
    the CSS command is
    overflow:auto;
    you can use like
    <body style="overflow: auto;"> or -- div style="overflow: auto;" 
    You can declare class in ".css" file
    #c1
    .c1
    <body id="c1>> or <div id="c1">
    <body class="c1>> or <div class="c1">
    You can use either "class" or "id" by adding it to "CSS" file and the use it to any JSP file or by direct aditing "Style" attirbute in tag.
    so when your content is longer then your screen browser will display scroll bar automatically.
    I hope this will help you.
    Thanks and Regards.
    eCommerce Developer
    Edited by: Ecommerce Developer on Jul 9, 2009 5:58 PM
    Edited by: Ecommerce Developer on Jul 9, 2009 5:59 PM

  • How to get a scroll bar to scroll down as new elements are added

    I have a JPanel that displays a list of information. As new information is added to the bottom of the list, a scroll bar appears. I require the scroll bar to scroll down as the new elements are added so that the most recent one's are in view all the time. Any ideas on how to do this?
    Thanks

    before adding each component.
    get the scrollbar object
    store the
    ScrollBar sb = JFrame.getScrollBar();
    int cmax = scrollbar.getVisibleAmount();
    add component .....
    int nmax = scrollbar.getVisibleAmount();
    int diff = nmax - cmax;
    sb.setValue(sb.getValue() + diff);
    assuming you can get the scrollbar object from the
    JFrame, ContentPane of JScrollPane.

  • How to get vertical scroll bars for a window?

    hi All,
    i have a window in my smart form ( not main window ) . it displays long text of a PO header. since user can enter huge amount of long text i want to enable vertical scroll bar in smart form window so that it shows all the long text.
    How to enable that for a window in smart form? any pointers would be highly appreciated.
    Thanks,
    Sreekanth.

    Hi
    Only the main window can have a dynamic heigh, all other windows have a static size: so u make sure the long text can be displayed in the window .
    Max

  • How to add a scroll bar within a view window ?I want to display x and y axis outside the scoll window and keep those axis static and move the graph within scroll area

    how to add a scroll bar within a view window ?I want to display x and y axis outside the scoll window and keep those axis static and move the graph within scroll area
    ananya

    Hey Ananya,
    I believe what you want to do is possible, but it will not be
    easy.  If you want to add a scroll bar that will scroll the graph
    back and forth but keep the axis set, you would want to add a
    horizontal or vertical scrollbar.  Then you would create an event
    handler for the scroll event.  You would have to manually plot
    different data within this scroll event.  Unfortunately, there is
    not really a built in way to do this with the Measurement Studio plot
    control.
    Thanks,
    Pat P.
    Software Engineer
    National Instruments

  • How Do I Get back scroll bar arrows Back

    Is there a way to get back scroll bar arrows back in OS 10.8.4  ? Thats all.

    Newer systems might also provide different functionality instead of just more.
    There are many cases where Apple has changed things (taken away here, given something different there) and with good results.
    However I agree with you bernuli:  (Mountain) Lion has been a disaster in many ways.  At least to me.  I produce information and want to be productive with precision and speed.  I know how to spell and I know what I am looking at.  So I want all animations OFF, all spelling checking OFF, all horrible yellow "tooltips" OFF and so on.
    Just today I have finally switched, after more than two years ago buying a machine specially for Lion and figuring out how to live with it.  I can still feel my blood pressure rise, despite a lot of tweaking in those two years.  I want those little arrows back (using TinkerTool I had both of them at the top and both at the bottom!)  The keyboard arrows are NOT a replacement.
    You will be assimilated into the touch-interface world, resistance is futile.

  • HT1338 How do you consistently get the scroll bar on the right side of the page

    How do you consistently get the scroll bar on the right side of the page.

    Go into System Preferences, select General and set "Show scroll bars" to "Always".

  • How to get motion scroll in adobe muse?

    I can't find motion scroll effect in Window Menu and properties bar. So how to get motion scroll in adobe muse. U have any idea?

    Hi,
    could you please add a screenshot of the windows tab so that we can see what is wrong?

  • How do you add scrolling to a view in TabbedViewNavigatorApplication?

    This is a mobile app for iOS.
    This particular view includes a series of questions. Answers are posted at the top, with new questions appearing below, meaning that the page gets longer and eventually extends somewhat below the bottom on landscape view.
    Thanks to another post, I was able to work out that mx.core.FlexGlobals.topLevelApplication.aspectRatio reliably returns either "landscape" or "portrait." The other width and height variables do not seem to be reliable.
    Listening to the ViewNavigatorEvent.REMOVING event reliably allows me to re-orient components, using Actionscript, as the user changes the orientation.
    The final part of the solution is to add scrollbars on the landscape view, so that things in that orientation don't become inaccessible.
    So the question is: How does one add scrolling to a View in TabbedViewNavigatorApplication, in a way that allows the user to re-orient the device as desired?
    I know I'm supposed to wrap the scroller around the component. I've tried this in multiple ways, and haven't stumbled on the right method (Im more familiar with Flex 3 than with Flex 4). I haven't seen a solution posted anywhere, though I have read Adobe documentation stating that it is possible. I've read the posts in this forum back to the release of Flex 4.5.1 and haven't seen a solution. Copy and paste code, including import statements, would sure be appreciated.
    Thanks.

    I would like to know this too.
    Howdo you enable scrolling of a TabbedViewNavigatorApplication?
    If I have 10 tabs but only wish to view 3.5 tabs at a time, how do I do this?

  • I just upgraded from snow leopard v10.6.8 to os x mountain lion and my scroll bar has disappeared on all my applications on the internet. does anyone know a patch to get the scroll bar to work.

    i just upgraded from snow leopard v10.6.8 to os x mountain lion and my scroll bar has disappeared on all my applications on the internet. does anyone know a patch to get the scroll bar to work.

    Open General preferences in System Preferences. You can set the desired scrollbar behavior there.

  • How to get the list of database Views modifying the DB tools list tables.vi

    Hi,
    I have a problem, I just started using LabVIEW and in particular the LabVIEW connectivity toolkit and I am lookig fgor suggestion regarding how to get the list of database Views modifying the DB tools list tables.vi...
    Thanks in advance,
    Michela

    Hi Michela,
    since the VI you want to modify is part of a Toolkit, I suggest you to copy the whole block diagram in a new VI and then save it in a new location.
    Place the DB List Tables.vi on a block diagram, double click on it and go to the tab "Window -> Show Block Diagram "
    Select "Edit -> Select All" to select the whole block diagram and select "Edit -> Copy"
    Open a new VI and select "Edit -> Paste"
    Save the new VI
    In this way you can modify everything you want without overwriting the Toolkits VIs.
    Hope this can help.
    Regards, 
    Andrea N.
    Systems Engineer ATE & RF - Mediterranean Region
    National Instruments Italy

  • How to make a scroll Bar with buttons

    Hi all,
    I am using Flash cs6 on an iMAC running 10.7.2
    I would like to know if anyone could please point me to a tutorial, showing "how to create a scroll bar with buttons". I am having a heck of a time finding a tutorial.
    Many thanks in advance.
    regards,
    DH

    http://learnola.com/2008/10/27/flash-tutorial-create-a-custom-scrollbar-with-actionscript/

Maybe you are looking for

  • I bought the wrong version

    Does anyone know how to switch which version you buy after it is bought... I bought the Windows version and I need the MAC version... OOPS!

  • App.launchURL does not open sometimes

    Hello everyone I need help with this problem, for some reason, in certain circumstances, Adobe Reader 8.1.3 with the button that runs the javascript: app.launchURL("http://...", true); is not open, no error throws to JS console, or anything ... you c

  • Windows XP non networked laptop

    I would allow it. make sure that you get all the service patches youi can for it and get it as up to date as possible. I would also install a different browser just in case it has to hit the internet for something in the future. XP only goes to IE8 a

  • ComboBox disabled after binding with vo

    Hi, i have comboBox... its is enabled..after binding with view object its disabled.. Ive tried to change it from code and property inspector but nothing helps.\ Code from pageDef <combobox id="DCComboBox" xmlns="http://xmlns.oracle.com/adfm/jcuimodel

  • PDF-Export Dialogbox in InDesign CC

    Hallo zusammen, ich habe ein Frage zur PDF-Export Dialogbox in InDesign CC (zu erreichen über cmd+e). In bisherigen Versionen der Creative Suite war es so, dass der Seitenbereich automatisch markiert war und man sofort den benötigten Seitenbereich ei