---
title: "Access to the path xaml"  
description: "Access to the path xaml"  
author: "Anonymous User"  
published: 2013-12-23  
updated: 2013-12-23  
canonical: https://www.mindstick.com/forum/1821/access-to-the-path-xaml  
category: "wpf"  
tags: ["wpf"]  
reading_time: 1 minute  

---

# Access to the path xaml

I have [problem](https://yourviews.mindstick.com/view/81399/tackling-the-problem-of-unemployment-during-corona-pandemic) with [access](https://www.mindstick.com/articles/12994/how-foreigners-can-access-blocked-websites-in-china) to the [path](https://www.mindstick.com/articles/44333/4-expert-tips-on-how-to-pick-the-right-career-path) in [canvas](https://www.mindstick.com/forum/1383/how-can-i-print-a-canvas-in-wpf), I want to be able to changing the 'fill' in my [code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii)(c#).

## These is my xaml code:

```
<Canvas Name="hour" Opacity="0.05" Grid.Row="2" Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" Width="0" Height="0" >    <Path Fill="Aquamarine">        <Path.Data>            <EllipseGeometry RadiusX="50" RadiusY="50"/>        </Path.Data>    </Path></Canvas>
```

[Anyone](https://www.mindstick.com/articles/23207/how-to-find-the-best-fit-job-for-anyone) has an idea, how to get it? Thanks for help!

## Replies

### Reply by Pravesh Singh

Hi Jay,

Just give it a name:

```
<Path x:Name="myPath" Fill="Aquamarine">So you can access it in code, like:myPath.Fill = new SolidColorBrush(Colors.Blue);
```


---

Original Source: https://www.mindstick.com/forum/1821/access-to-the-path-xaml

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
