# Text outline for ScaleLine and MouseCoordinate

**URL:** <https://community.thinkgeo.com/t/text-outline-for-scaleline-and-mousecoordinate/9109>\
**Category:** WPF\
**Created:** [May 21, 2018, 4:51am UTC](https://community.thinkgeo.com/t/text-outline-for-scaleline-and-mousecoordinate/9109 "2018-05-21T04:51:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yohan\_Prasetia\_Siswa](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/y/a9a28c/32.png) [@Yohan\_Prasetia\_Siswa](https://community.thinkgeo.com/u/Yohan_Prasetia_Siswa)\
**Post date:** [May 21, 2018, 4:51am UTC](https://community.thinkgeo.com/t/text-outline-for-scaleline-and-mousecoordinate/9109/1 "2018-05-21T04:51:22Z")

</div>

Hi,

What is the best method to set an outline / stroke for ScaleLine and MouseCoordinate?

My map is often used to view images that are either very dark or very bright.  
So I need to change the style of text and lines in Scaleline and MouseCoordinate to one with a black fill / foreground and a white outline/stroke.

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [May 21, 2018, 8:04am UTC](https://community.thinkgeo.com/t/text-outline-for-scaleline-and-mousecoordinate/9109/2 "2018-05-21T08:04:03Z")

</div>

Hi Yohan,

The only you can changed is the text color, it looks I hadn’t found a way to modify the line color.

Please view the code as below:

```
  map.Background = new SolidColorBrush((Color)ColorConverter.ConvertFromString("Green"));

 map.MapTools.ScaleLine.IsEnabled = true;            
 map.MapTools.ScaleLine.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("Blue"));

 map.MapTools.MouseCoordinate.IsEnabled = true;            
 map.MapTools.MouseCoordinate.Foreground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("White"));

```

![](https://community.thinkgeo.com/uploads/default/optimized/3X/a/8/a8c84ceadeffa48b046c1dec333c1ab698117f66_2_690x66.png)

Regards,

Ethan

---

<div class="post-metadata">

**Author:** ![Yohan\_Prasetia\_Siswa](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/y/a9a28c/32.png) [@Yohan\_Prasetia\_Siswa](https://community.thinkgeo.com/u/Yohan_Prasetia_Siswa)\
**Post date:** [May 21, 2018, 9:02am UTC](https://community.thinkgeo.com/t/text-outline-for-scaleline-and-mousecoordinate/9109/3 "2018-05-21T09:02:23Z")

</div>

Hi Ethan,

I don’t think just changing the text color will work. There is an “Effect” property for ScaleLine and MouseCoordinate, so maybe we can set it there?

The scale line in MapSuiteGisEditor sample has an outline, so there should be a way to set it:

![](https://community.thinkgeo.com/uploads/default/original/3X/3/6/360592cb4545674c51390687e4ef59b3cfe4f59b.png)

If that doesn’t work, is there a way to set the background of ScaleLine and MouseCoordinate to white? I tried setting the “background” property, but there were no effect.

---

<div class="post-metadata">

**Author:** ![Mark\_Lee](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/m/c5a1d2/32.png) [@Mark\_Lee](https://community.thinkgeo.com/u/Mark_Lee)\
**Post date:** [May 22, 2018, 8:49am UTC](https://community.thinkgeo.com/t/text-outline-for-scaleline-and-mousecoordinate/9109/4 "2018-05-22T08:49:33Z")

</div>

Hi Yohan,

We created one sample to show you how to implement that. Please refer the attachment.  
[Post9109.zip](https://community.thinkgeo.com/uploads/default/original/3X/d/1/d182eb302b92e7e9bc11d27607b1f1554aedf840.zip) (10.3 KB)

 ![](https://community.thinkgeo.com/uploads/default/original/3X/5/a/5a9202331ea1e8fcbef83918235e2356ae8caacc.png)

If you need any more information, please let me know that.

Thanks  
Mark

---

<div class="post-metadata">

**Author:** ![Yohan\_Prasetia\_Siswa](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/y/a9a28c/32.png) [@Yohan\_Prasetia\_Siswa](https://community.thinkgeo.com/u/Yohan_Prasetia_Siswa)\
**Post date:** [May 23, 2018, 2:25am UTC](https://community.thinkgeo.com/t/text-outline-for-scaleline-and-mousecoordinate/9109/5 "2018-05-23T02:25:45Z")

</div>

Thank you for the example, Mark.

Is there a similar adornmentLayer for mouse coordinate ?

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [May 23, 2018, 5:28am UTC](https://community.thinkgeo.com/t/text-outline-for-scaleline-and-mousecoordinate/9109/6 "2018-05-23T05:28:58Z")

</div>

Hi Yohan,

We don’t have an adornmentlayer for mouse coordinates, please view attached sample which shows how to implement it.

 ![](https://community.thinkgeo.com/uploads/default/original/3X/f/6/f659cb3a91f336c1a93458a1cd6fc7ed289322f5.png)

[9109.zip](https://community.thinkgeo.com/uploads/default/original/3X/9/4/94b68bc3cbd0481d9bf16a7db695626e9cd3a4a5.zip) (11.0 KB)

Regards,

Ethan

---

<div class="post-metadata">

**Author:** ![Yohan\_Prasetia\_Siswa](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/y/a9a28c/32.png) [@Yohan\_Prasetia\_Siswa](https://community.thinkgeo.com/u/Yohan_Prasetia_Siswa)\
**Post date:** [May 23, 2018, 7:07am UTC](https://community.thinkgeo.com/t/text-outline-for-scaleline-and-mousecoordinate/9109/7 "2018-05-23T07:07:08Z")

</div>

Thank you, Ethan.

That is exactly what I needed.

---

<div class="post-metadata">

**Author:** ![Ethan](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/ethan/32/19964_2.png) [@Ethan](https://community.thinkgeo.com/u/Ethan)\
**Post date:** [May 23, 2018, 7:54am UTC](https://community.thinkgeo.com/t/text-outline-for-scaleline-and-mousecoordinate/9109/8 "2018-05-23T07:54:27Z")

</div>

Hi Yohan,

I am glad to hear that works.

Regards,

Ethan
