---
title: "Buttons not accessible in Wpf Codebehind"  
description: "Buttons not accessible in Wpf Codebehind"  
author: "Anonymous User"  
published: 2014-01-27  
updated: 2014-01-27  
canonical: https://www.mindstick.com/forum/1886/buttons-not-accessible-in-wpf-codebehind  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Buttons not accessible in Wpf Codebehind

There is a [function](https://www.mindstick.com/articles/13001/multi-statement-table-valued-user-defined-function-in-sql-server) in Codebehind c# The [Code](https://yourviews.mindstick.com/view/85458/alan-turing-the-mastermind-behind-cracking-the-enigma-code-during-world-war-ii) is Like :

```
private static void ReceiveCallback(IAsyncResult ar){                                                                                                        // ...}
```

In this Function i have to set the [visibility](https://www.mindstick.com/blog/301300/how-to-improve-your-visibility-in-zero-click-search-results) of a [button](https://www.mindstick.com/articles/63/how-to-add-button-in-datagridview-in-csharp-dot-net) to [true](https://yourviews.mindstick.com/view/81326/boycott-chinese-products-dream-will-come-true) :

Runrc.IsEnabled = true;

But I get no [intellisense](https://answers.mindstick.com/qa/115739/why-is-intellisense-not-working-in-visual-studio-2026) for this button in that function, and it's [giving](https://yourviews.mindstick.com/view/80639/regifting-is-far-better-than-giving-away-a-bouquet) me a error.

## Replies

### Reply by Pravesh Singh

Hi Jacob,

That is because the method is static. You cannot access a instance member in static method without its object reference.

```
private void ReceiveCallback(IAsyncResult ar)//Remove static{   // access your button here}
```


---

Original Source: https://www.mindstick.com/forum/1886/buttons-not-accessible-in-wpf-codebehind

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
